:root {
  --green-950: #032f29;
  --green-900: #063f35;
  --green-800: #075848;
  --green-700: #08715b;
  --green-600: #0a8a6e;
  --green-100: #dff3ec;
  --green-50: #eff9f5;
  --slate-950: #14232f;
  --slate-800: #2e4352;
  --slate-600: #60727d;
  --slate-400: #97a5ad;
  --cream: #f7f6f1;
  --paper: #fff;
  --line: #dce3df;
  --amber: #b7791f;
  --red: #b93d4a;
  --shadow-sm: 0 8px 28px rgba(23, 51, 45, .07);
  --shadow-lg: 0 32px 80px rgba(13, 48, 41, .14);
  --radius: 18px;
}

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

.brand-logo { display: inline-flex; align-items: center; overflow: hidden; background: #fff; }
.brand-logo img { display: block; width: 152px; height: 58px; object-fit: contain; }

.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 180px 1fr; align-items: center; min-height: 82px; padding: 10px clamp(24px, 5vw, 76px); border-bottom: 1px solid rgba(220,227,223,.9); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 30px; color: var(--slate-600); font-size: 14px; font-weight: 700; }
.site-nav a { padding: 10px 0; }
.site-nav a:hover, .site-nav a.active { color: var(--green-700); }
.site-nav .nav-login { padding: 12px 18px; color: #fff; border-radius: 10px; background: var(--green-900); }
.nav-toggle { display: none; justify-self: end; padding: 8px 12px; color: var(--green-900); border: 1px solid var(--line); border-radius: 9px; background: #fff; font-weight: 800; }

.home-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(42px, 7vw, 110px); align-items: center; min-height: 690px; padding: 90px clamp(24px, 6vw, 96px); background: linear-gradient(118deg, #fff 0 57%, #e7f2ed 57% 100%); }
.home-hero::before { position: absolute; right: 7%; top: 4%; width: 330px; height: 330px; border: 1px solid rgba(8,113,91,.12); border-radius: 50%; content: ""; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; margin-bottom: 20px; color: var(--green-700); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.home-hero h1 { max-width: 720px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 6vw, 82px); font-weight: 500; letter-spacing: -.05em; line-height: .98; }
.home-hero h1 em { color: var(--green-700); font-style: normal; }
.hero-lead { max-width: 660px; margin: 28px 0 34px; color: var(--slate-600); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; border: 1px solid transparent; border-radius: 10px; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--green-800); box-shadow: 0 12px 28px rgba(7,88,72,.2); }
.button-primary:hover { background: var(--green-900); }
.button-secondary { color: var(--green-900); border-color: #bdcec7; background: #fff; }
.button-quiet { color: var(--slate-800); border-color: var(--line); background: var(--paper); }
.button-danger { color: #fff; background: var(--red); }
.button-small { min-height: 38px; padding: 0 14px; font-size: 13px; }
.button-block { width: 100%; }
.trust-line { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; color: var(--slate-600); font-size: 13px; font-weight: 700; }
.trust-line span::before { margin-right: 7px; color: var(--green-700); content: "✓"; }

.hero-visual { position: relative; z-index: 2; }
.overview-panel { overflow: hidden; border: 1px solid rgba(7,88,72,.15); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow-lg); }
.overview-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 26px; color: #fff; background: var(--green-950); }
.overview-head strong { font-size: 15px; }
.overview-head span { color: #a8d8ca; font-size: 12px; }
.overview-body { padding: 28px; }
.overview-metric { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.overview-metric small { display: block; color: var(--slate-600); }
.overview-metric strong { display: block; margin-top: 3px; font-family: Georgia, serif; font-size: 42px; font-weight: 500; }
.metric-mark { display: grid; width: 72px; height: 72px; place-items: center; color: #fff; border-radius: 22px 4px 22px 4px; background: var(--green-700); font-size: 22px; font-weight: 900; }
.overview-list { display: grid; gap: 0; margin-top: 10px; }
.overview-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid #edf0ee; }
.overview-row:last-child { border-bottom: 0; }
.overview-row i { width: 9px; height: 9px; border-radius: 50%; background: var(--green-600); }
.overview-row small { color: var(--slate-600); }
.overview-row b { color: var(--green-800); font-size: 12px; }

.section { padding: 100px clamp(24px, 6vw, 96px); }
.section-white { background: var(--paper); }
.section-dark { color: #fff; background: var(--green-950); }
.section-title { max-width: 780px; margin-bottom: 48px; }
.section-title h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.section-title p { max-width: 680px; margin: 16px 0 0; color: var(--slate-600); font-size: 17px; }
.section-dark .section-title p { color: #aac0b8; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service { padding: 34px 28px 38px 0; }
.service + .service { padding-left: 28px; border-left: 1px solid var(--line); }
.service-number { color: var(--green-700); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.service h3 { margin: 34px 0 12px; font-size: 22px; }
.service p { margin: 0; color: var(--slate-600); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.2); }
.process-step span { color: #76c2ad; font-family: Georgia, serif; font-size: 32px; }
.process-step h3 { margin: 30px 0 9px; font-size: 18px; }
.process-step p { margin: 0; color: #aac0b8; font-size: 14px; }
.home-cta { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding: 55px; border: 1px solid #c9d9d2; background: #eef6f2; }
.home-cta h2 { max-width: 750px; margin: 0 0 12px; font-family: Georgia, serif; font-size: clamp(32px, 4vw, 48px); font-weight: 500; line-height: 1.08; }
.home-cta p { margin: 0; color: var(--slate-600); }
.site-footer { display: grid; grid-template-columns: 180px 1fr auto; gap: 30px; align-items: center; padding: 32px clamp(24px, 5vw, 76px); border-top: 1px solid var(--line); background: #fff; color: var(--slate-600); font-size: 12px; }
.site-footer .brand-logo img { width: 120px; height: 46px; }

/* Authentication */
.auth-page { min-height: 100vh; background: #eef3ef; }
.auth-layout { display: grid; grid-template-columns: minmax(360px, .82fr) 1.18fr; min-height: 100vh; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 48px clamp(34px, 5vw, 76px); color: #fff; background: var(--green-950); }
.auth-aside::after { position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px; border: 85px solid rgba(255,255,255,.05); border-radius: 50%; content: ""; }
.auth-logo { align-self: flex-start; padding: 7px 12px; border-radius: 12px; }
.auth-logo img { width: 150px; height: 72px; }
.auth-message { position: relative; z-index: 2; margin: auto 0; }
.auth-message h1 { max-width: 540px; margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 5vw, 70px); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.auth-message p { max-width: 510px; margin: 24px 0 0; color: #b7cec6; font-size: 17px; }
.auth-points { display: grid; gap: 14px; margin-top: 34px; }
.auth-points span { display: flex; align-items: center; gap: 11px; color: #dfece7; font-size: 14px; }
.auth-points i { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #79c9b2; font-style: normal; }
.auth-main { display: grid; place-items: center; padding: 48px 24px; background: #f8faf8; }
.auth-card { width: min(480px, 100%); }
.auth-back { display: inline-flex; margin-bottom: 38px; color: var(--slate-600); font-size: 13px; font-weight: 800; }
.auth-card .eyebrow { margin-bottom: 12px; }
.auth-card h2 { margin: 0; font-family: Georgia, serif; font-size: 42px; font-weight: 500; letter-spacing: -.035em; }
.auth-card > p { margin: 13px 0 30px; color: var(--slate-600); }
.form-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--slate-800); font-size: 13px; font-weight: 800; }
.field small { color: var(--slate-600); }
.input, .select, .textarea { width: 100%; min-height: 49px; padding: 0 14px; color: var(--slate-950); border: 1px solid #cbd5d0; border-radius: 9px; outline: none; background: #fff; }
.textarea { min-height: 110px; padding-top: 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(10,138,110,.1); }
.form-error { padding: 13px 15px; color: #8b2732; border-left: 3px solid var(--red); background: #faecee; font-size: 13px; }
.install-callout { margin-top: 24px; padding: 18px; border: 1px solid #c6dcd3; background: var(--green-50); }
.install-callout strong { display: block; margin-bottom: 5px; }
.install-callout p { margin: 0 0 13px; color: var(--slate-600); font-size: 13px; }

/* Diagnostic */
.diagnostic-page { min-height: 100vh; background: #f5f6f2; }
.diagnostic-wrap { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 90px; }
.diagnostic-intro { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 30px; }
.diagnostic-intro h1 { max-width: 720px; margin: 0; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 58px); font-weight: 500; line-height: 1.04; }
.diagnostic-intro p { max-width: 650px; margin: 14px 0 0; color: var(--slate-600); }
.step-count { color: var(--green-700); font-size: 13px; font-weight: 900; }
.progress-line { height: 4px; margin-bottom: 22px; background: #dce5e0; }
.progress-line span { display: block; width: 25%; height: 100%; background: var(--green-700); transition: width .25s ease; }
.diagnostic-card { padding: clamp(26px, 5vw, 48px); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.question-step { display: none; }
.question-step.active { display: block; }
.question-step h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.question-step > p { margin: 0 0 28px; color: var(--slate-600); }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { display: flex; min-height: 70px; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); cursor: pointer; background: #fff; font-weight: 700; }
.choice input:checked + label { color: var(--green-900); border-color: var(--green-600); background: var(--green-50); box-shadow: inset 4px 0 var(--green-600); }
.choice-mark { display: grid; width: 30px; height: 30px; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--green-800); background: var(--green-100); font-size: 12px; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.result-layout { display: grid; grid-template-columns: 230px 1fr; gap: 42px; align-items: start; }
.score-block { padding: 28px; color: #fff; background: var(--green-950); text-align: center; }
.score-block strong { display: block; font-family: Georgia, serif; font-size: 68px; font-weight: 500; line-height: 1; }
.score-block span { color: #b9d0c8; }
.result-copy h2 { margin-top: 0; font-family: Georgia, serif; font-size: 40px; font-weight: 500; }
.recommendations { display: grid; gap: 10px; margin-top: 24px; }
.recommendation { padding: 15px 17px; border-left: 3px solid var(--green-600); background: var(--green-50); }

/* Application */
.app-body { min-height: 100vh; background: #f3f5f2; }
.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; border-right: 1px solid rgba(255,255,255,.07); color: #fff; background: var(--green-950); }
.sidebar-logo { padding: 22px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo .brand-logo { padding: 4px 9px; border-radius: 9px; }
.sidebar-logo img { width: 128px; height: 54px; }
.app-nav { display: grid; gap: 4px; padding: 24px 14px; }
.app-nav a { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 0 13px; color: #aac0b8; border-radius: 8px; font-size: 13px; font-weight: 750; }
.app-nav a:hover, .app-nav a.active { color: #fff; background: rgba(255,255,255,.09); }
.app-nav a.active { box-shadow: inset 3px 0 #6fc3aa; }
.nav-glyph { width: 22px; color: #76c2ad; text-align: center; font-weight: 900; }
.sidebar-user { display: flex; gap: 11px; align-items: center; margin: auto 18px 12px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.1); }
.user-avatar { display: grid; width: 38px; height: 38px; place-items: center; color: var(--green-950); border-radius: 50%; background: #b8dfd2; font-weight: 900; }
.sidebar-user span:last-child { display: grid; min-width: 0; }
.sidebar-user strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #91aaa1; font-size: 11px; }
.logout-form { padding: 0 18px 20px; }
.logout-form button { width: 100%; padding: 10px; color: #c7d8d2; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: transparent; font-size: 12px; font-weight: 800; }
.app-main { min-width: 0; }
.app-topbar { display: flex; min-height: 96px; align-items: center; justify-content: space-between; gap: 24px; padding: 20px clamp(24px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.87); }
.app-topbar h1 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.topbar-kicker { color: var(--green-700); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.secure-indicator { color: var(--slate-600); font-size: 12px; }
.secure-indicator::first-letter { color: var(--green-600); }
.sidebar-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.app-content { padding: 34px clamp(24px, 4vw, 54px) 70px; }
.flash { margin-bottom: 22px; padding: 14px 17px; border-left: 4px solid; background: #fff; box-shadow: var(--shadow-sm); font-size: 13px; }
.flash-success { color: #075b48; border-color: var(--green-600); }
.flash-error { color: #8d2530; border-color: var(--red); }
.flash-info { color: var(--slate-800); border-color: var(--slate-400); }
.welcome-band { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 28px; padding: 28px 30px; color: #fff; background: linear-gradient(120deg, var(--green-950), var(--green-800)); box-shadow: var(--shadow-sm); }
.welcome-band h2 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.welcome-band p { margin: 0; color: #b8cfc7; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card { padding: 22px; border: 1px solid var(--line); background: #fff; }
.stat-card span { color: var(--slate-600); font-size: 12px; font-weight: 750; }
.stat-card strong { display: block; margin-top: 10px; font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.stat-card small { color: var(--green-700); font-size: 11px; font-weight: 800; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 20px; }
.panel { min-width: 0; border: 1px solid var(--line); background: #fff; box-shadow: 0 6px 22px rgba(27,51,44,.04); }
.panel + .panel { margin-top: 20px; }
.content-grid .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head p { margin: 4px 0 0; color: var(--slate-600); font-size: 12px; }
.panel-body { padding: 22px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 12px 14px; color: var(--slate-600); border-bottom: 1px solid var(--line); background: #fafbf9; text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { padding: 15px 14px; border-bottom: 1px solid #edf0ee; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table strong { color: var(--slate-950); }
.muted { color: var(--slate-600); }
.empty-state { padding: 36px 20px; color: var(--slate-600); text-align: center; }
.status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.is-success { color: #08705b; background: #e2f3ed; }
.is-warning { color: #8a5b12; background: #faf0d7; }
.is-danger { color: #a52f3d; background: #f9e4e7; }
.is-neutral { color: #53636d; background: #edf0ef; }
.action-list { display: grid; gap: 10px; }
.action-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #edf0ee; font-size: 13px; font-weight: 750; }
.action-link:last-child { border-bottom: 0; }
.action-link span { color: var(--green-700); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.section-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.split-panels { display: grid; grid-template-columns: minmax(340px,.75fr) minmax(0,1.25fr); gap: 20px; }
.file-input { min-height: 48px; padding: 10px; border: 1px dashed #a9b9b2; background: #f9fbfa; }

@media (max-width: 1050px) {
  .home-hero { grid-template-columns: 1fr; background: linear-gradient(180deg, #fff, #e7f2ed); }
  .hero-copy { max-width: 800px; }
  .hero-visual { max-width: 680px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid, .split-panels { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 82px; left: 0; right: 0; display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 15px 24px 22px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 0; }
  .site-nav .nav-login { margin-top: 8px; padding: 12px 16px; text-align: center; }
  .services-grid { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .service:last-child { border-bottom: 0; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: 390px; }
  .auth-message { margin: 60px 0; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; z-index: 90; left: -280px; width: 260px; transition: left .2s ease; }
  .app-sidebar.open { left: 0; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar-toggle { display: inline-grid; place-items: center; }
  .app-topbar { justify-content: flex-start; }
  .secure-indicator { margin-left: auto; }
}

@media (max-width: 620px) {
  .brand-logo img { width: 128px; height: 52px; }
  .home-hero { min-height: auto; padding-top: 65px; }
  .home-hero h1 { font-size: 46px; }
  .overview-body { padding: 20px; }
  .section { padding-top: 70px; padding-bottom: 70px; }
  .process-grid, .field-grid, .choices, .form-grid, .stats-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .home-cta { align-items: flex-start; flex-direction: column; padding: 34px 26px; }
  .site-footer { grid-template-columns: 1fr; }
  .diagnostic-intro { grid-template-columns: 1fr; }
  .result-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: 330px; padding: 30px 24px; }
  .auth-message h1 { font-size: 43px; }
  .auth-points { display: none; }
  .auth-main { padding: 40px 22px; }
  .app-topbar { padding: 16px 20px; }
  .app-content { padding: 24px 16px 55px; }
  .secure-indicator { display: none; }
  .welcome-band { align-items: flex-start; flex-direction: column; padding: 24px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
}

