/* Clinivance Labs — design system v2: white surfaces, Clinivance blue as the lead colour. */
:root {
  --blue: #1659b8;
  --blue-600: #114c9f;
  --blue-700: #0d3d84;
  --blue-900: #0a2350;
  --blue-50: #eff5fe;
  --blue-100: #dce9fc;
  --blue-200: #b9d2f7;
  --ink: #0b1f3a;
  --text: #43536b;
  --muted: #6b7a90;
  --line: #e4eaf3;
  --line-2: #cfd9e7;
  --bg: #ffffff;
  --bg-soft: #f6f9fe;
  --ok: #157a4c; --ok-bg: #e5f6ed;
  --warn: #9a5b00; --warn-bg: #fff3dc;
  --bad: #b42318; --bad-bg: #fdecea;
  --violet: #6b46c1; --violet-bg: #f1ecfd;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  --serif: Georgia, "Times New Roman", serif;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(11,31,58,.05), 0 8px 24px -8px rgba(22,89,184,.16);
  --shadow-lg: 0 2px 4px rgba(11,31,58,.05), 0 24px 56px -16px rgba(13,61,132,.35);
  --wrap: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.015em; line-height: 1.3; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.lede { font-size: 1.18rem; line-height: 1.6; color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-note { margin-top: 14px; }
.hl { color: var(--blue); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 650 .95rem/1 var(--font); padding: 14px 22px;
  border-radius: 999px; border: 1.5px solid var(--blue); background: var(--blue); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; box-shadow: 0 8px 20px -8px rgba(22,89,184,.6); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--blue); color: var(--blue); box-shadow: none; }
.btn.white { background: #fff; color: var(--blue-700); border-color: #fff; }
.btn.white:hover { background: var(--blue-50); color: var(--blue-700); }
.btn.ghost-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn.ghost-white:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn.steel { background: var(--blue); }
.btn.sm { padding: 8px 14px; font-size: .85rem; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f2c4bf; }
.btn.danger:hover { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.btn.link { background: none; border: 0; color: var(--blue); padding: 0; font-weight: 650; box-shadow: none; }
.arrow::after { content: "→"; display: inline-block; transition: transform .15s; }
a:hover .arrow::after, .btn.arrow:hover::after, a.arrow:hover::after { transform: translateX(3px); }
label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
input, select, textarea { width: 100%; font: 15px/1.45 var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
input[type=file] { padding: 10px; background: var(--bg-soft); border-style: dashed; }
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 13px 16px; border-radius: var(--r-sm); margin: 18px 0; font-size: .95rem; border: 1px solid; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe5d0; }
.alert.error { background: var(--bad-bg); color: var(--bad); border-color: #f4c7c1; }
.alert ul { margin: 0; padding-left: 18px; }

/* ------------------------------------------------------------------ header & footer */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; height: 78px; gap: 32px; }
.brand-logo img { height: 42px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem; padding: 9px 14px; border-radius: 999px; }
.site-nav a:hover { background: var(--blue-50); color: var(--blue); }
.site-nav a.on { color: var(--blue); background: var(--blue-50); }
.site-nav .nav-cta { display: flex; gap: 8px; margin-left: 14px; }
.site-nav .nav-cta .btn { padding: 11px 18px; }
.site-nav .nav-cta .btn.secondary:hover { background: #fff; }
.site-nav .nav-cta .btn:not(.secondary) { color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: var(--blue-50); color: var(--blue); border: 0; border-radius: 999px; padding: 10px 16px; font: 600 .9rem var(--font); cursor: pointer; }
.site-footer { background: var(--blue-900); color: #b8c7de; }
.site-footer .wrap { padding-top: 72px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; }
.footer-grid h4 { color: #fff; font-size: .95rem; letter-spacing: 0; margin: 4px 0 18px; }
.footer-grid a { color: #c9d6ea; text-decoration: none; display: block; padding: 5px 0; font-size: .95rem; }
.footer-grid a:hover { color: #fff; }
.footer-logo img { width: 230px; margin-bottom: 18px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); margin-top: 56px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; font-size: .875rem; color: #8ea3c4; flex-wrap: wrap; }
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 28px -6px rgba(37,211,102,.6); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* ------------------------------------------------------------------ hero */
.hero-shell { padding: 14px 14px 0; }
.hero { position: relative; overflow: hidden; border-radius: 28px; color: #fff;
  background: radial-gradient(1200px 500px at 85% -10%, #2f7be0 0%, transparent 60%), linear-gradient(135deg, #1659b8 0%, #0d3d84 70%, #0a2f69 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding-top: 92px; padding-bottom: 100px; }
.hero h1 { color: #fff; }
.hero h1 .soft { color: #9cc5ff; }
.hero .lede { color: #d6e5fb; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero-badges { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 36px; color: #cfe0fa; font-size: .9rem; }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges svg { width: 18px; height: 18px; color: #8fc0ff; }

/* portal mock inside hero */
.mock { background: #fff; color: var(--text); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); font: 500 .78rem var(--mono); color: var(--muted); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock-bar span { margin-left: 10px; }
.mock-body { padding: 20px; display: grid; gap: 14px; }
.mock-proj { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.mock-proj .top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.mock-proj strong { color: var(--ink); font-size: .98rem; line-height: 1.35; }
.mock-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 14px 0 8px; }
.mock-steps i { height: 6px; border-radius: 3px; background: var(--line); }
.mock-steps i.on { background: var(--blue); }
.mock-steps i.now { background: linear-gradient(90deg, var(--blue) 50%, var(--blue-200) 50%); }
.mock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mock-file { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: .84rem; }
.mock-file .ic { flex: none; width: 32px; height: 38px; border-radius: 6px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font: 800 .6rem var(--mono); }
.mock-file b { display: block; color: var(--ink); font-size: .86rem; }
.mock-msg { background: var(--blue-50); border-radius: 14px 14px 14px 4px; padding: 11px 14px; font-size: .86rem; color: var(--ink); }
.mock-msg small { display: block; color: var(--muted); font-size: .74rem; margin-bottom: 2px; }
.float-card { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: .82rem; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.float-card .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; }
.float-card .dot svg { width: 18px; height: 18px; }
.float-card small { display: block; color: var(--muted); }
.hero-visual { position: relative; }
.hero-visual .float-card.a { left: -34px; bottom: 54px; }
.hero-visual .float-card.b { right: -18px; top: -22px; }

/* ------------------------------------------------------------------ sections */
.section { padding: 112px 0; }
.section.soft { background: var(--bg-soft); }
.section.tight { padding: 72px 0; }
.section-title { max-width: 760px; margin-bottom: 56px; }
.section-title.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title p { font-size: 1.1rem; color: var(--text); margin: 0; }
.split-title { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 52px; }
.split-title h2 { max-width: 640px; margin: 0; }

.sectors { padding: 40px 0 0; }
.sectors .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 40px; color: var(--muted); font-size: .95rem; }
.sectors strong { color: var(--ink); font-weight: 700; font-size: 1.02rem; display: inline-flex; align-items: center; gap: 9px; }
.sectors strong::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.stat { padding: 30px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .n { font: 800 2.6rem/1 var(--display); letter-spacing: -0.04em; color: var(--blue); margin-bottom: 8px; }
.stat .t { color: var(--ink); font-weight: 650; }
.stat .d { color: var(--muted); font-size: .88rem; }

.icon { width: 52px; height: 52px; border-radius: 14px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; transition: background .2s, color .2s; }
.icon svg { width: 26px; height: 26px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 30px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--blue-200); color: var(--text); }
a.card:hover .icon { background: var(--blue); color: #fff; }
.card h3 { margin: 22px 0 10px; }
.card p { flex: 1; font-size: .97rem; }
.card .more { color: var(--blue); font-weight: 650; font-size: .93rem; margin-top: 6px; }

/* journey */
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.journey::before { content: ""; position: absolute; left: 7%; right: 7%; top: 27px; height: 3px; background: linear-gradient(90deg, var(--blue) 0%, var(--blue-200) 100%); border-radius: 2px; }
.jstep { position: relative; text-align: center; padding: 0 6px; }
.jstep .dot { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); color: var(--blue); display: grid; place-items: center; font: 800 1.05rem var(--display); position: relative; }
.jstep:last-child .dot { background: var(--blue); color: #fff; }
.jstep h3 { font-size: 1.08rem; margin-bottom: 6px; }
.jstep p { font-size: .9rem; color: var(--muted); }

/* split (portal) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 26px 0 32px; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.checks li::before { content: ""; flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231659b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.panel-blue { background: linear-gradient(140deg, var(--blue-50) 0%, var(--blue-100) 100%); border-radius: 28px; padding: 40px; }

/* why */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.why .card { flex-direction: row; gap: 20px; align-items: flex-start; }
.why .card h3 { margin: 2px 0 8px; }
.why .card p { margin: 0; }

/* process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: st; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 30px 26px; position: relative; }
.step::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue); color: #fff; font: 800 1.1rem var(--display); margin-bottom: 22px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: .95rem; margin: 0; }

/* faq */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.faq-list details[open] { border-color: var(--blue-200); box-shadow: var(--shadow); }
.faq-list summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 700; color: var(--ink); position: relative; font-size: 1.02rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font: 600 1.15rem/1 var(--font); }
.faq-list details[open] summary::after { content: "–"; background: var(--blue); color: #fff; }
.faq-list details p { padding: 0 22px 20px; margin: 0; color: var(--text); }
.faq-search { margin-bottom: 18px; }

/* CTA */
.cta-shell { padding: 0 14px 14px; }
.cta { border-radius: 28px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(800px 400px at 0% 100%, #2f7be0 0%, transparent 60%), linear-gradient(135deg, #1659b8, #0d3d84); }
.cta .wrap { position: relative; padding-top: 88px; padding-bottom: 88px; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta h2 { color: #fff; margin-bottom: 12px; max-width: 18ch; }
.cta p { color: #d6e5fb; margin: 0; max-width: 52ch; font-size: 1.08rem; }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* inner pages */
.page-hero { background: linear-gradient(180deg, var(--blue-50) 0%, #fff 100%); padding: 84px 0 64px; }
.page-hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.8rem); max-width: 18ch; }
.page-hero .lede { font-size: 1.2rem; }
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; padding: 72px 0; border-bottom: 1px solid var(--line); align-items: center; scroll-margin-top: 96px; }
.svc-row:last-child { border-bottom: 0; }
.svc-row:nth-child(even) .svc-text { order: 2; }
.svc-row h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: 22px; }
.svc-row .icon { width: 60px; height: 60px; border-radius: 16px; background: var(--blue); color: #fff; }
.svc-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.svc-nav a { text-decoration: none; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); color: var(--ink); font-weight: 550; font-size: .9rem; }
.svc-nav a:hover { border-color: var(--blue); color: var(--blue); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; padding: 16px 0 112px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 38px; box-shadow: var(--shadow); }
.side-steps { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 18px; counter-reset: s; }
.side-steps li { display: flex; gap: 16px; }
.side-steps li::before { counter-increment: s; content: counter(s); flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font: 800 .95rem var(--display); }
.side-steps strong { display: block; color: var(--ink); }
.contact-box { border-radius: var(--r); background: var(--bg-soft); border: 1px solid var(--line); padding: 22px; display: grid; gap: 10px; }
.contact-box a { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; color: var(--ink); }
.contact-box a svg { width: 20px; height: 20px; color: var(--blue); }
.prose { max-width: 780px; padding: 24px 0 112px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }

/* work-sample panels */
.sample { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.sample-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft); font: 500 .78rem var(--mono); color: var(--muted); }
.sample-body { padding: 24px; }
.ms-title { font: 700 1.05rem/1.4 var(--serif); color: var(--ink); margin-bottom: 4px; }
.ms-auth { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.ms-abs { font: .88rem/1.6 var(--serif); color: var(--text); }
.ms-abs b { font: 700 .7rem var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.ms-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 12px 0 4px; }
.ms-table th, .ms-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.ms-table th { font-weight: 650; color: var(--muted); }
.ms-table td.num { font-family: var(--mono); font-size: .8rem; }
.review-note { display: flex; gap: 10px; align-items: center; margin: 16px -24px -24px; padding: 14px 24px; background: var(--blue-50); font-size: .84rem; color: var(--ink); }
.review-note .who { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; font: 800 .68rem var(--font); }
.review-note .ok { margin-left: auto; color: var(--ok); font-weight: 700; white-space: nowrap; }
.prisma { display: grid; grid-template-columns: 1fr 30px 1fr; row-gap: 10px; font-size: .84rem; }
.prisma .box { border: 1.5px solid var(--blue-200); background: #fff; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.prisma .box b { font-family: var(--mono); font-weight: 600; color: var(--blue); }
.prisma .box.x { border-style: dashed; border-color: var(--line-2); color: var(--muted); grid-column: 3; }
.prisma .box.x b { color: var(--muted); }
.prisma .box.main { grid-column: 1; }
.prisma .to { grid-column: 2; align-self: center; height: 2px; background: var(--line-2); }
.prisma .box.final { background: var(--blue); border-color: var(--blue); color: #fff; }
.prisma .box.final b { color: #fff; }
.forest { font-size: .84rem; }
.forest .row { display: grid; grid-template-columns: 110px 1fr 56px; align-items: center; height: 28px; }
.forest .row.head { color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line-2); height: 32px; }
.forest .row.pooled { border-top: 1px solid var(--line-2); margin-top: 4px; font-weight: 700; color: var(--ink); }
.forest .track { position: relative; height: 100%; }
.forest .track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1.5px dashed var(--line-2); }
.forest .ci { position: absolute; top: 50%; height: 2px; background: var(--ink); }
.forest .pt { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--blue); border-radius: 2px; }
.forest .diamond { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--blue-700); transform: rotate(45deg); }
.forest .num { font-family: var(--mono); text-align: right; }
.forest .axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .74rem; margin: 6px 0 0 110px; padding-right: 56px; }
.forest-note { margin: 12px 0 0; }

/* auth */
.auth-page { min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 56px 20px; background: linear-gradient(180deg, var(--blue-50), #fff 70%); }
.auth-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 42px 38px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 2rem; }
.auth-card .btn:not(.secondary) { width: 100%; margin-top: 6px; }

/* ================================================================== app (portal + admin) */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; background: var(--bg-soft); }
.sidebar { background: var(--blue-900); color: #b8c7de; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { padding: 24px 22px 22px; }
.sidebar .logo img { width: 176px; }
.sidebar .role { display: inline-block; margin-top: 14px; font: 650 .72rem/1 var(--font); color: #cfe0fa; background: rgba(255,255,255,.08); padding: 6px 10px; border-radius: 999px; }
.side-nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; color: #c9d6ea; text-decoration: none; padding: 11px 14px; border-radius: 12px; font-weight: 550; font-size: .94rem; }
.side-nav a svg { width: 19px; height: 19px; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.on { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -8px rgba(22,89,184,.8); }
.side-nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 4px; }
.side-foot { margin-top: auto; padding: 18px; }
.side-foot .card-me { background: rgba(255,255,255,.06); border-radius: 14px; padding: 14px; font-size: .85rem; }
.side-foot .who { color: #fff; font-weight: 650; }
.side-foot form { margin-top: 12px; }
.side-foot button { width: 100%; background: transparent; border: 1px solid rgba(255,255,255,.18); color: #dbe6f6; border-radius: 10px; padding: 9px; font: 600 .85rem var(--font); cursor: pointer; }
.side-foot button:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 30px 40px 4px; }
.topbar h1 { font-size: 1.9rem; margin: 0; letter-spacing: -0.03em; }
.topbar .acts { display: flex; gap: 10px; align-items: center; }
.crumb { font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--blue); }
.content { padding: 24px 40px 72px; }
.content > .alert:first-child { margin-top: 0; }
.mobile-bar { display: none; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; text-decoration: none; color: var(--text); transition: box-shadow .2s, border-color .2s; }
a.kpi:hover { border-color: var(--blue-200); box-shadow: var(--shadow); color: var(--text); }
.kpi .l { font-size: .84rem; font-weight: 600; color: var(--muted); }
.kpi .v { font: 800 1.9rem/1.1 var(--display); letter-spacing: -0.03em; color: var(--ink); margin: 10px 0 4px; }
.kpi .s { font-size: .82rem; color: var(--muted); }
.kpi.primary { background: linear-gradient(135deg, var(--blue), var(--blue-700)); border-color: transparent; }
.kpi.primary .l, .kpi.primary .s { color: #cfe0fa; }
.kpi.primary .v { color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 24px; scroll-margin-top: 20px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 1.08rem; margin: 0; letter-spacing: -0.01em; }
.panel-head a.small { font-weight: 600; text-decoration: none; }
.panel-head form input { width: 250px; padding: 9px 12px; }
.panel-body { padding: 20px 22px; }
.panel-body.flush { padding: 0; }
.empty { padding: 32px 22px; text-align: center; color: var(--muted); font-size: .94rem; }

table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { text-align: left; font-size: .78rem; font-weight: 650; color: var(--muted); padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
table.data td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click:hover td { background: var(--blue-50); cursor: pointer; }
table.data a.title { color: var(--ink); font-weight: 650; text-decoration: none; }
table.data a.title:hover { color: var(--blue); }
table.data select { width: auto; padding: 7px 10px; border-radius: 999px; font-size: .85rem; }
.num-col { text-align: right; font-variant-numeric: tabular-nums; }

.pill { display: inline-block; font: 650 .74rem/1 var(--font); padding: 6px 10px; border-radius: 999px; background: #eef1f6; color: #4a5a72; white-space: nowrap; }
.pill.active, .pill.published, .pill.paid, .pill.accepted { background: var(--ok-bg); color: var(--ok); }
.pill.on_hold, .pill.revision, .pill.sent, .pill.quote, .pill.under_review, .pill.submitted, .pill.new { background: var(--warn-bg); color: var(--warn); }
.pill.cancelled, .pill.overdue, .pill.rejected { background: var(--bad-bg); color: var(--bad); }
.pill.completed, .pill.converted, .pill.final, .pill.in_preparation { background: var(--blue-50); color: var(--blue-700); }
.pill.draft { background: #eef1f6; color: #4a5a72; }
.pill.client { background: var(--violet-bg); color: var(--violet); }
.unread { display: inline-block; min-width: 22px; text-align: center; font: 700 .72rem/1 var(--font); background: var(--blue); color: #fff; padding: 4px 7px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stepper div { padding-top: 12px; border-top: 5px solid var(--line); border-radius: 3px; font-size: .86rem; color: var(--muted); font-weight: 550; }
.stepper div.done { border-top-color: var(--blue); color: var(--ink); }
.stepper div.now { border-top-color: var(--blue); color: var(--blue); font-weight: 750; }
.stepper div.now::after { content: " · now"; font-weight: 550; color: var(--muted); }
.stepper.compact div { padding-top: 7px; font-size: .74rem; border-top-width: 4px; }
.stepper.compact div.now::after { content: ""; }

.proj-card { display: block; padding: 20px 22px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); transition: background .15s; }
.proj-card:last-child { border-bottom: 0; }
.proj-card:hover { background: var(--blue-50); color: var(--text); }
.proj-card .top { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 14px; }
.proj-card h3 { font-size: 1.05rem; margin: 0 0 4px; }
.proj-card .meta { font-size: .85rem; color: var(--muted); }
.proj-card .next { font-size: .87rem; color: var(--text); margin-top: 12px; }
.proj-card .next strong { color: var(--ink); }

.doc { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc .ext { width: 42px; height: 48px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font: 800 .62rem var(--mono); text-transform: uppercase; }
.doc .t { font-weight: 650; color: var(--ink); }
.doc .t a { color: var(--ink); text-decoration: none; }
.doc .t a:hover { color: var(--blue); }
.doc .m { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.doc .acts { display: flex; gap: 8px; align-items: center; }
.doc-group { padding: 10px 22px; background: var(--bg-soft); border-bottom: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--muted); }

.ms { display: flex; gap: 12px; align-items: center; padding: 13px 22px; border-bottom: 1px solid var(--line); font-size: .93rem; color: var(--ink); }
.ms:last-child { border-bottom: 0; }
.ms .box { width: 20px; height: 20px; border: 2px solid var(--line-2); border-radius: 6px; flex: none; display: grid; place-items: center; background: #fff; }
.ms.done .box { background: var(--blue); border-color: var(--blue); }
.ms.done .box::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.ms.done .ttl { color: var(--muted); text-decoration: line-through; }
.ms .ttl a { color: var(--ink); text-decoration: none; font-weight: 600; }
.ms .ttl a:hover { color: var(--blue); }
.ms .due { margin-left: auto; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.ms .due.late { color: var(--bad); font-weight: 650; }
.ms form { margin: 0; }
.ms button.box { cursor: pointer; padding: 0; }

.thread { max-height: 520px; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-soft); }
.msg { max-width: 78%; }
.msg .bubble { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 11px 15px; white-space: pre-wrap; font-size: .94rem; color: var(--ink); }
.msg .by { font-size: .76rem; color: var(--muted); margin: 0 4px 4px; }
.msg.mine { align-self: flex-end; }
.msg.mine .bubble { background: var(--blue); color: #fff; border-color: var(--blue); border-radius: 16px 16px 4px 16px; }
.msg.mine .by { text-align: right; }
.composer { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 48px; height: 48px; border-radius: 14px; }

.pub { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub .t { font-weight: 700; color: var(--ink); line-height: 1.4; margin-bottom: 8px; }
.pub .m { font-size: .84rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pub-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 12px; }
.pub-track i { height: 6px; background: var(--line); border-radius: 3px; }
.pub-track i.on { background: var(--blue); }

.activity { list-style: none; margin: 0; padding: 6px 22px; }
.activity li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--text); }
.activity li strong { color: var(--ink); }
.activity li:last-child { border-bottom: 0; }
.activity .when { color: var(--muted); font-size: .78rem; margin-left: 6px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 8px; }
.toolbar input { width: 300px; padding: 10px 14px; border-radius: 999px; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 9px 16px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.tabs a:hover { border-color: var(--blue-200); color: var(--blue); }
.tabs a.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.invite-box { display: flex; gap: 8px; margin-top: 10px; }
.invite-box input { font-family: var(--mono); font-size: .84rem; }
details.inline { border-top: 1px solid var(--line); }
details.inline > summary { cursor: pointer; padding: 15px 22px; font-weight: 650; font-size: .9rem; color: var(--blue); list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline > summary::before { content: "+ "; }
details.inline[open] > summary::before { content: "– "; }
details.inline .form-inner { padding: 0 22px 20px; }
dl.facts { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 0; font-size: .93rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: var(--ink); font-weight: 550; }
.inline-form { display: inline; margin: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions select { width: auto; padding: 8px 12px; border-radius: 999px; }
.msg-pre { white-space: pre-wrap; color: var(--text); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .hero .wrap, .split, .faq-grid, .contact-grid, .svc-row { grid-template-columns: 1fr; gap: 44px; }
  .svc-row:nth-child(even) .svc-text { order: 0; }
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .journey { grid-template-columns: 1fr; gap: 16px; }
  .journey::before { left: 27px; right: auto; top: 20px; bottom: 20px; width: 3px; height: auto; }
  .jstep { display: grid; grid-template-columns: 56px 1fr; gap: 0 18px; text-align: left; align-items: center; }
  .jstep .dot { margin: 0; grid-row: span 2; }
  .jstep h3 { margin: 0; }
  .jstep p { margin: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-2.even { grid-template-columns: 1fr; }
  .hero-visual .float-card { display: none; }
  .split-title { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 860px) {
  .site-nav { display: none; position: absolute; top: 78px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav .nav-cta { margin: 10px 0 0; flex-direction: column; }
  .nav-toggle { display: block; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .mobile-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--blue-900); }
  .mobile-bar img { height: 30px; }
  .mobile-bar button { background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font: 600 .85rem var(--font); }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  table.data th:nth-child(n+4), table.data td:nth-child(n+4) { display: none; }
  .why { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .cards, .steps, .stats, .footer-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .hero .wrap { padding-top: 56px; padding-bottom: 56px; }
  .hero-shell, .cta-shell { padding-left: 8px; padding-right: 8px; }
  .hero, .cta { border-radius: 20px; }
  .section { padding: 76px 0; }
  .cta .wrap { flex-direction: column; align-items: flex-start; padding-top: 56px; padding-bottom: 56px; }
  .mock-row { grid-template-columns: 1fr; }
  .panel-blue { padding: 20px; }
  .form-card { padding: 24px; }
}
@media print { .sidebar, .mobile-bar, .site-header, .site-footer, .wa-float { display: none; } .app { display: block; } }

/* refinements */
.hero h1 { font-size: clamp(2.5rem, 4.4vw, 3.9rem); }
.hero-visual .float-card.a { left: -40px; bottom: -26px; }
.hero .wrap { padding-bottom: 110px; }
.stats-section { padding: 56px 0 0; }
.cta-shell { margin: 24px 0 72px; }
.faq-grid h2 { margin-bottom: 14px; }
.side-nav a svg { flex: none; }
.contact-box .btn { justify-content: center; color: #fff; margin-top: 6px; }
.contact-box strong { color: var(--ink); }
.auth-card p.muted { margin-bottom: 22px; }
