:root {
  --navy-950: #081629;
  --navy-900: #0b1d36;
  --navy-800: #0f2a4a;
  --navy-700: #183a62;
  --ink: #12223b;
  --text: #33445c;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f2f5f9;
  --bg-tint: #f7f9fc;
  --orange: #f47b20;
  --orange-600: #e0670d;
  --orange-50: #fff3ea;
  --green: #3f9c4f;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 74, .06), 0 2px 8px rgba(15, 42, 74, .05);
  --shadow: 0 10px 30px -10px rgba(15, 42, 74, .18), 0 2px 6px rgba(15, 42, 74, .06);
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --header-h: 76px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.eyebrow-light { color: rgba(255, 255, 255, .78); }
.eyebrow span { margin: 0 .55em; color: var(--orange); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px -6px rgba(244, 123, 32, .6); }
.btn-primary:hover { background: var(--orange-600); transform: translateY(-1px); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 18px -12px rgba(15, 42, 74, .35); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-mark { width: 30px; height: 36px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--font-head); font-weight: 800; font-size: 25px; color: var(--navy-800); letter-spacing: -0.01em; }
.logo-sub { font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--navy-700); margin-top: 5px; }
.logo-light .logo-name { color: #fff; }
.logo-light .logo-sub { color: rgba(255, 255, 255, .7); }

.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 6px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: 6px;
  font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none;
  transition: color .15s, background-color .15s;
}
.nav-link:hover { color: var(--orange-600); }
.nav-item { position: relative; }
.dd {
  position: absolute; top: calc(100% + 6px); left: -8px; min-width: 290px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.dd::before { content: ""; position: absolute; inset: -10px 0 auto 0; height: 10px; }
.dd a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink); }
.dd a .ic { color: var(--orange); }
.dd a:hover { background: var(--bg-soft); }
.has-dd:hover .dd, .has-dd:focus-within .dd, .has-dd.open .dd { opacity: 1; visibility: visible; transform: none; }
.has-dd:hover .dd-toggle .ic, .has-dd.open .dd-toggle .ic { transform: rotate(180deg); }
.dd-toggle .ic { transition: transform .2s; }

.header-cta { flex: none; margin-left: 12px; }
.nav-cta-mobile, .menu-toggle { display: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 120% at 0% 0%, #17365c 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: #fff;
}
.hero-media { position: absolute; inset: 0 0 0 auto; width: 56%; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--navy-900) 0%, rgba(11, 29, 54, .72) 14%, rgba(11, 29, 54, .15) 42%, rgba(11, 29, 54, 0) 70%),
    linear-gradient(0deg, rgba(8, 22, 41, .35), rgba(8, 22, 41, 0) 40%);
}
.hero-inner { min-height: 540px; display: flex; align-items: center; padding-top: 56px; padding-bottom: 48px; }
.hero-content { max-width: 680px; }
.hero h1 { color: #fff; font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 22px; }
.accent { color: var(--orange); }
.nowrap { white-space: nowrap; }
.hero-lead { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; color: rgba(255, 255, 255, .9); max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.stats { display: flex; flex-wrap: wrap; gap: 0; }
.stat { display: flex; align-items: center; gap: 14px; padding: 4px 22px; border-left: 1px solid rgba(255, 255, 255, .22); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-ic { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.stat strong { display: block; font-family: var(--font-head); font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: rgba(255, 255, 255, .82); }

.hero-badge {
  position: absolute; right: max(24px, calc((100vw - 1200px) / 2)); bottom: 28px;
  display: flex; align-items: center; gap: 14px;
  max-width: 330px; padding: 16px 20px;
  background: rgba(255, 255, 255, .95); color: var(--ink);
  border-radius: var(--radius); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .45);
}
.badge-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e8f5ea; color: var(--green); flex: none; }
.badge-ic .ic { width: 22px; height: 22px; fill: rgba(63, 156, 79, .18); }
.hero-badge strong { display: block; font-size: 14px; line-height: 1.3; font-weight: 600; }
.hero-badge span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }

/* Sections */
.section { padding: 80px 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 64px; align-items: end; margin-bottom: 36px; }
.section-head h2, .process h2, .projects h2 { font-size: clamp(28px, 3.2vw, 38px); }
.section-intro { color: var(--muted); font-size: 15.5px; max-width: 480px; justify-self: end; }

.services { background: var(--bg-tint); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 720 / 420; overflow: hidden; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.card h3 { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.ic-card { width: 30px; height: 30px; color: var(--orange); stroke-width: 2.2; }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.link-more {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--navy-800);
}
.link-more .ic { width: 18px; height: 18px; transition: transform .2s; }
.link-more:hover { color: var(--orange-600); }
.link-more:hover .ic { transform: translateX(3px); }

/* Workflow: process + quote + projects */
.workflow { padding: 72px 0 80px; background: #fff; }
.workflow-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 40px;
  grid-template-areas: "process quote" "projects quote";
}
.process {
  grid-area: process; padding-bottom: 56px; margin-bottom: 48px;
  background: var(--bg-soft); box-shadow: 0 0 0 100vmax var(--bg-soft); clip-path: inset(-72px -100vmax 0 -100vmax);
}
.process h2 { margin-bottom: 32px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; display: flex; align-items: flex-start; gap: 14px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; right: -14px; top: 20px; width: 10px; height: 10px;
  border-top: 2px solid var(--navy-700); border-right: 2px solid var(--navy-700); transform: rotate(45deg); opacity: .7;
}
.step-ic {
  display: grid; place-items: center; width: 54px; height: 54px; flex: none;
  border-radius: 50%; border: 2px solid var(--navy-800); background: #fff; color: var(--navy-800);
}
.step-ic .ic { width: 24px; height: 24px; }
.step h3 { font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 4px 0 6px; }
.step p { font-size: 13.5px; line-height: 1.5; color: var(--muted); padding-right: 12px; }

.quote { grid-area: quote; position: relative; }
.quote-card {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 26px 24px 22px;
}
.quote-card h2 { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.quote-lead { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin-bottom: 18px; }
.quote-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field select, .field input, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid #d3dbe6; border-radius: 7px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312223b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.field select:invalid, .field select:has(option[value=""]:checked) { color: #8a97a8; }
.field select option { color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #8a97a8; }
.field select:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(24, 58, 98, .14); }
.field.invalid select, .field.invalid input { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214, 69, 69, .12); }
.quote-form .btn { margin-top: 4px; min-height: 50px; font-size: 16px; }
.form-note { font-size: 12.5px; color: var(--muted); }
.form-note.error { color: #c03a3a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { text-align: center; padding: 20px 4px 8px; }
.success-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e8f5ea; color: var(--green); margin-bottom: 14px; }
.form-success h3 { font-size: 19px; margin-bottom: 6px; }
.form-success p { color: var(--muted); font-size: 14.5px; }

.projects { grid-area: projects; }
.projects-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.projects h2 { font-size: clamp(22px, 2.2vw, 26px); margin-bottom: 6px; }
.projects-head p { color: var(--muted); font-size: 14.5px; max-width: 560px; }
.link-underline { display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 14px; font-weight: 600; color: var(--navy-800); text-decoration: underline; text-underline-offset: 4px; }
.link-underline .ic { width: 16px; height: 16px; }
.link-underline:hover { color: var(--orange-600); }
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.project img { width: 100%; aspect-ratio: 13 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 12px; background: var(--bg-soft); }
.project strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.project span { font-size: 13.5px; color: var(--muted); }

/* Features */
.features { border-top: 1px solid var(--line); background: #fff; padding: 36px 0; }
.feature-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { display: flex; align-items: center; gap: 16px; }
.feature-ic { width: 42px; height: 42px; flex: none; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature-ic.green { stroke: var(--green); fill: rgba(63, 156, 79, .15); }
.feature-ic.orange { stroke: var(--orange); }
.feature-ic.thick { stroke-width: 4; stroke-linecap: butt; }
.feature strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.feature span { font-size: 13.5px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .78); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.footer-brand p { margin-top: 18px; font-size: 14.5px; max-width: 320px; }
.footer-col h3 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; font-size: 14.5px; }
.footer-col a { text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.contact-list .ic { color: var(--orange); width: 18px; height: 18px; }
.footer-col .btn { margin-top: 8px; color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; padding-bottom: 24px;
  font-size: 13.5px; color: rgba(255, 255, 255, .6);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* Modal */
.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border: 0; border-radius: var(--radius-lg); padding: 32px 30px 30px;
  box-shadow: 0 30px 80px -20px rgba(8, 22, 41, .5); color: var(--text);
}
.modal::backdrop { background: rgba(8, 22, 41, .55); backdrop-filter: blur(2px); }
.modal[open] { animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-ic { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--orange-50); color: var(--orange); margin-bottom: 16px; }
.modal h2 { font-size: 24px; margin-bottom: 12px; padding-right: 32px; }
.modal p { font-size: 15.5px; margin-bottom: 18px; }
.checklist { display: grid; gap: 10px; margin-bottom: 26px; }
.checklist li { position: relative; padding-left: 30px; font-size: 15px; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #e8f5ea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f9c4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Maja andmed */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { background: #fff; color: var(--navy-800); border-color: #c9d3e0; min-height: 42px; padding: 0 16px; font-size: 14.5px; }
.btn-outline:hover { border-color: var(--navy-800); }
.btn:disabled { opacity: .65; cursor: progress; transform: none; }
.btn.is-loading .ic { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-hero { background: radial-gradient(120% 140% at 0% 0%, #17365c 0%, var(--navy-900) 60%, var(--navy-950) 100%); color: #fff; padding: 44px 0 48px; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); margin: 10px 0 14px; }
.page-hero p { color: rgba(255, 255, 255, .85); max-width: 680px; font-size: 17px; }
.crumbs { font-size: 13.5px; color: rgba(255, 255, 255, .65); }
.crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-hidden] { margin: 0 6px; }

.md-section { background: var(--bg-soft); padding: 40px 0 80px; }
.md-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.md-form, .md-success { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.md-form { padding: 8px 28px 28px; min-width: 0; }
.md-step { border: 0; margin: 0; padding: 24px 0 26px; border-bottom: 1px solid var(--line); min-width: 0; }
.md-step legend { display: flex; align-items: center; gap: 12px; float: left; width: 100%; margin-bottom: 18px; font-family: var(--font-head); font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.md-step legend + * { clear: both; }
.step-no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange-50); color: var(--orange-600); font-size: 14px; font-family: var(--font-body); font-weight: 700; flex: none; }
.step-lead { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.field-help { font-size: 13px; color: var(--muted); margin-top: 8px; }

.ehr-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 14px; align-items: end; }
.ehr-row .btn { min-height: 44px; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 34px; }
.input-suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.ehr-status { font-size: 14px; margin-top: 10px; min-height: 1px; color: var(--text); }
.ehr-status:empty { display: none; }
.ehr-status.error { color: #c03a3a; }
.ehr-status.ok { color: #2f7d3d; }
.ehr-result { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-tint); padding: 16px 18px; }
.ehr-result-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ehr-result-head > .ic { color: var(--orange); margin-top: 2px; }
.ehr-result-head strong { display: block; color: var(--ink); font-size: 15.5px; line-height: 1.35; }
.ehr-result-head span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.ehr-link { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--navy-800); }
.ehr-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; margin: 0; }
.ehr-facts dt { font-size: 12.5px; color: var(--muted); }
.ehr-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); font-size: 15px; }

.units-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.field-count { width: 150px; }
.units-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.units-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: 520px; background: #fff; }
.units { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14px; }
.units th { position: sticky; top: 0; z-index: 1; background: var(--bg-soft); text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.units td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.units tr:last-child td { border-bottom: 0; }
.units .num { text-align: right; }
.units input, .units select {
  width: 100%; min-height: 36px; padding: 6px 8px; font: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid #d3dbe6; border-radius: 6px;
}
.units select { appearance: none; -webkit-appearance: none; padding-right: 26px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312223b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px; }
.units select:disabled { background-color: var(--bg-soft); color: var(--muted); }
.units input:focus, .units select:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(24, 58, 98, .14); }
.units td:nth-child(1) { min-width: 150px; }
.units td:nth-child(2) { min-width: 150px; }
.units td:nth-child(3) { width: 80px; }
.units td:nth-child(4) { width: 70px; }
.units td:nth-child(5) { width: 96px; }
.units .u-area { text-align: right; }
.units .u-volume { width: 84px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.units tr.is-nonres td { background: #fbfaf7; }
.u-remove { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; color: var(--muted); }
.u-remove:hover { background: #fdecec; color: #c03a3a; }
.units-empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.units-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 0; }
.units-totals div { background: var(--bg-tint); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.units-totals dt { font-size: 12.5px; color: var(--muted); }
.units-totals dd { margin: 2px 0 0; font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.units-totals dd.hint { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--muted); padding-top: 3px; }

.files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.file-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 128px; padding: 16px 12px; text-align: center; cursor: pointer;
  border: 1.5px dashed #c3cedc; border-radius: var(--radius); background: var(--bg-tint); color: var(--muted);
  transition: border-color .15s, background-color .15s;
}
.file-drop:hover, .file-drop.drag { border-color: var(--orange); background: var(--orange-50); }
.file-drop:focus-within { border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(24, 58, 98, .14); }
.file-drop > .ic { color: var(--orange); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-label { font-size: 13.5px; }
.file-label strong { color: var(--navy-800); }
.file-name { font-size: 13px; color: var(--ink); font-weight: 500; word-break: break-all; }
.file-name:empty { display: none; }
.file-drop.has-file { border-style: solid; border-color: #9cc8a5; background: #f1f9f2; }
.file-drop.has-file .file-label { display: none; }
.file-drop.has-file > .ic { color: var(--green); }
.file-clear { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.file-clear:hover { background: #fff; color: #c03a3a; }
.files-meter { margin-top: 14px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.meter span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.meter.over span { background: #d64545; }
#files-status { font-size: 13px; color: var(--muted); }
#files-status.error { color: #c03a3a; }
#files-status a { color: var(--navy-800); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field-wide { grid-column: 1 / -1; }
.md-submit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 24px; }
.md-submit .form-note { font-size: 13.5px; }

.md-success { padding: 48px 28px; text-align: center; }
.md-success h2 { font-size: 24px; margin-bottom: 8px; }
.md-success p { color: var(--muted); max-width: 460px; margin: 0 auto 22px; }

.md-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 22px 20px; box-shadow: var(--shadow-sm); }
.aside-card h2 { font-size: 17px; margin-bottom: 14px; }
.aside-card .checklist { margin-bottom: 14px; gap: 8px; }
.aside-card .checklist li { font-size: 14px; }
.aside-steps { counter-reset: s; display: grid; gap: 10px; }
.aside-steps li { counter-increment: s; position: relative; padding-left: 32px; font-size: 14px; color: var(--text); }
.aside-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-50); color: var(--orange-600); font-weight: 700; font-size: 12px; }
.aside-steps a { color: var(--navy-800); font-weight: 600; }
.aside-note { font-size: 13px; color: var(--muted); }

.process-cta { margin-top: 28px; margin-right: 8px; }
.kk-promo { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--orange-50); font-size: 14px; color: var(--ink); }
.kk-promo .ic { color: var(--orange); margin-top: 2px; }
.kk-promo a { color: var(--navy-800); font-weight: 600; }
.quote-more { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.quote-more a { color: var(--navy-800); font-weight: 600; }

/* Responsive */
@media (max-width: 1140px) {
  .nav-list { gap: 0; }
  .nav-link { padding: 10px 9px; font-size: 14.5px; }
  .header-inner { gap: 16px; }
  .workflow-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 0 28px; }
  .steps { grid-template-columns: 1fr; gap: 18px; max-width: 460px; }
  .step:not(:last-child)::after { display: none; }
}

@media (max-width: 1000px) {
  :root { --header-h: 68px; }
  .header-cta { display: none; }
  .menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: 8px; color: var(--navy-800); }
  .menu-toggle .icon-close { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(15, 42, 74, .35);
    padding: 12px 16px 20px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-link { width: 100%; padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; justify-content: space-between; }
  .dd { position: static; min-width: 0; border: 0; box-shadow: none; padding: 4px 0 8px 8px; display: none; opacity: 1; visibility: visible; transform: none; }
  .has-dd:hover .dd, .has-dd:focus-within .dd { display: none; }
  .has-dd.open .dd { display: block; }
  .has-dd:hover .dd-toggle .ic { transform: none; }
  .has-dd.open .dd-toggle .ic { transform: rotate(180deg); }
  .nav-cta-mobile { display: flex; width: 100%; margin-top: 16px; }

  .hero-media { width: 100%; }
  .hero-media::after { background: linear-gradient(90deg, rgba(11, 29, 54, .94) 0%, rgba(11, 29, 54, .82) 55%, rgba(11, 29, 54, .6) 100%); }
  .hero-inner { min-height: 0; padding-top: 64px; padding-bottom: 40px; }
  .hero-badge { position: static; margin: 0 24px 36px; max-width: 360px; }

  .section-head { grid-template-columns: 1fr; gap: 14px; }
  .section-intro { justify-self: start; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; flex-direction: row; }
  .cards .card:last-child .card-media { flex: 0 0 48%; aspect-ratio: auto; }

  .workflow-grid { grid-template-columns: 1fr; grid-template-areas: "process" "quote" "projects"; }
  .process { padding-bottom: 40px; margin-bottom: 40px; }
  .steps { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .quote { margin-bottom: 48px; }
  .quote-card { position: static; max-width: 560px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .md-layout { grid-template-columns: minmax(0, 1fr); }
  .md-aside { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .logo-name { font-size: 21px; }
  .logo-sub { font-size: 8.5px; }
  .logo-mark { width: 26px; height: 32px; }
  .hero-inner { padding-top: 40px; padding-bottom: 32px; }
  .eyebrow-light { font-size: 11px; letter-spacing: .12em; }
  .eyebrow span { margin: 0 .35em; }
  .hero-actions { margin-bottom: 32px; }
  .hero-actions .btn { width: 100%; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 12px; }
  .stat-ic { width: 28px; height: 28px; }
  .stat strong { font-size: 22px; }
  .stat span { display: block; font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
  .hero-badge { margin: 0 16px 28px; }
  .section { padding: 60px 0; }
  .cards { grid-template-columns: 1fr; }
  .cards .card:last-child { flex-direction: column; }
  .cards .card:last-child .card-media { aspect-ratio: 720 / 420; }
  .workflow { padding: 56px 0 60px; }
  .process { clip-path: inset(-56px -100vmax 0 -100vmax); }
  .steps { grid-template-columns: 1fr; }
  .projects-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .project-grid { gap: 14px; }
  .feature-list { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .modal { padding: 28px 20px 22px; }

  .page-hero { padding: 32px 0 36px; }
  .page-hero p { font-size: 16px; }
  .md-section { padding: 20px 0 56px; }
  .md-form { padding: 4px 16px 20px; }
  .md-step legend { font-size: 17px; }
  .ehr-row { grid-template-columns: 1fr 1fr; }
  .ehr-row .field:first-child { grid-column: 1 / -1; }
  .ehr-facts { grid-template-columns: 1fr 1fr; }
  .units-toolbar { align-items: stretch; }
  .field-count { width: 100%; }
  .units-actions, .units-actions .btn { flex: 1; }
  .units-totals { grid-template-columns: 1fr 1fr; }
  .units-wrap { max-height: none; overflow: visible; }
  .units, .units tbody { display: block; min-width: 0; }
  .units thead { display: none; }
  .units tr { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  .units tr:last-child { border-bottom: 0; }
  .units td { display: block; padding: 0; border: 0 !important; width: auto !important; min-width: 0 !important; }
  .units td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-bottom: 4px; text-align: left; }
  .units td:first-child { grid-column: 1 / -1; padding-right: 44px; }
  .units td:last-child { position: absolute; top: 30px; right: 10px; }
  .units .num, .units .u-area { text-align: left; }
  .units .u-volume { padding-top: 0; font-size: 15px; color: var(--ink); }
  .units tr.is-nonres { background: #fbfaf7; }
  .files { grid-template-columns: 1fr; }
  .file-drop { min-height: 88px; flex-direction: row; flex-wrap: wrap; }
  .contact-grid { grid-template-columns: 1fr; }
  .md-submit .btn { width: 100%; }
  .md-aside { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
