:root {
  --bg: #0a0e16;
  --bg-alt: #0e1420;
  --panel: #121a28;
  --line: #1f2a3c;
  --text: #e6eaf2;
  --muted: #8d99ae;
  --accent: #5eead4;
  --accent-ink: #04201c;
  --amber: #fbbf24;
  --red: #f87171;
  --green: #4ade80;
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }
.narrow { max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.eyebrow { font: 600 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 1.2em; }
.lead { font-size: 1.18rem; color: #c3cad8; max-width: 60ch; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(10,14,22,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.08rem; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--accent); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--muted); font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }

/* buttons */
.btn { display: inline-block; border-radius: 999px; padding: 12px 22px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font: 600 .98rem var(--font); transition: transform .15s, background .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #8ff3e2; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.btn-wide { width: 100%; padding: 15px; font-size: 1.05rem; }

/* hero */
.hero { padding: 96px 0 80px; background: radial-gradient(800px 400px at 85% 10%, rgba(94,234,212,.10), transparent 70%), radial-gradient(600px 300px at 0% 100%, rgba(251,191,36,.05), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head .dot { width: 10px; height: 10px; border-radius: 50%; background: #2a3548; }
.panel-title { margin-left: 10px; font: .8rem var(--mono); color: var(--muted); }
.log { list-style: none; margin: 0; padding: 16px; font: .82rem/1.9 var(--mono); }
.log li { display: grid; grid-template-columns: 48px 120px 1fr; gap: 8px; color: #c3cad8; opacity: 0; animation: fadein .5s forwards; }
.log li:nth-child(1) { animation-delay: .2s } .log li:nth-child(2) { animation-delay: .6s } .log li:nth-child(3) { animation-delay: 1s }
.log li:nth-child(4) { animation-delay: 1.4s } .log li:nth-child(5) { animation-delay: 1.8s } .log li:nth-child(6) { animation-delay: 2.2s }
.log .t { color: var(--muted); }
.log .a { color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* sections */
.section { padding: 88px 0; }
.section-tight { padding: 40px 0 80px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { color: #c3cad8; max-width: 70ch; font-size: 1.08rem; margin-bottom: 40px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color .2s; }
.card:hover { border-color: rgba(94,234,212,.4); }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card-icon { color: var(--accent); font-size: 1.3rem; margin-bottom: 14px; }

/* monteville */
.feature-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.feature-copy p { color: #c3cad8; }
.feature-copy h3 { margin-top: 1.4em; }
.feature-copy h3:first-child { margin-top: 0; }
.branch-figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 90px; }
.branch-figure svg { width: 100%; height: auto; display: block; }
.branch-figure figcaption { color: var(--muted); font-size: .88rem; margin-top: 12px; }
.branch-figure .axis { stroke: #33415a; stroke-width: 2; }
.branch-figure .ckpts circle { fill: var(--bg); stroke: var(--muted); stroke-width: 2; }
.branch-figure .ckpts .branch-pt { stroke: var(--accent); fill: var(--accent); }
.branch-figure .runs path { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: .55; stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 2.4s ease forwards; }
.branch-figure .runs path:nth-child(2) { animation-delay: .2s } .branch-figure .runs path:nth-child(3) { animation-delay: .4s }
.branch-figure .runs path:nth-child(4) { animation-delay: .6s } .branch-figure .runs path:nth-child(5) { animation-delay: .8s }
.branch-figure .baseline { fill: none; stroke: #c3cad8; stroke-width: 2; }
.branch-figure .lbl { fill: var(--muted); font: 11px var(--mono); }
.branch-figure .lbl-accent { fill: var(--accent); }
.branch-figure .kpi-box { fill: var(--bg); stroke: var(--line); }
.branch-figure .range { fill: #1d2738; }
.branch-figure .dist { fill: var(--accent); opacity: .7; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
.pillar { border-top: 2px solid var(--accent); padding-top: 18px; }
.pillar p { color: var(--muted); font-size: .93rem; }
.honest-note { margin-top: 36px; padding: 18px 22px; border: 1px dashed var(--line); border-radius: var(--radius); color: #c3cad8; }

/* process */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }
.step-n { display: block; font: 600 .85rem var(--mono); color: var(--accent); margin-bottom: 12px; }

/* form */
.form-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.form-intro { position: sticky; top: 100px; }
.form-intro p { color: #c3cad8; }
.assurances { list-style: none; padding: 0; margin: 24px 0 0; }
.assurances li { padding: 6px 0 6px 26px; position: relative; color: #c3cad8; }
.assurances li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.inquiry, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend { font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 14px; }
label { display: block; font-size: .9rem; color: #c3cad8; margin-bottom: 14px; font-weight: 500; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; font: 400 .98rem var(--font); }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94,234,212,.15); }
input[type=file] { padding: 9px; }
input[type=checkbox] { display: inline; width: auto; margin: 0 8px 0 0; accent-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { grid-template-columns: 1.4fr .8fr 1.2fr; }
.opt, .hint { color: var(--muted); font-weight: 400; font-size: .82rem; }
.hint { display: block; margin-top: 4px; }
.check { display: flex; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
.full-req { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; }
.full-req summary { cursor: pointer; font-weight: 600; color: var(--text); }
.full-req[open] summary { margin-bottom: 14px; }
.field-error { color: var(--red); font-size: .86rem; margin: -8px 0 12px; }
.form-alert { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.4); color: #fecaca; border-radius: 8px; padding: 12px 14px; margin-bottom: 20px; }
.form-alert.ok { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.4); color: #bbf7d0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.big-check { width: 72px; height: 72px; border-radius: 50%; background: rgba(94,234,212,.12); color: var(--accent); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 24px; }
.ref { font-family: var(--mono); color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row p { margin: 0; }

/* admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-head h1 { font-size: 1.8rem; margin: 0; }
.search { display: flex; gap: 8px; align-items: center; }
.search input { margin: 0; width: 280px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { color: var(--muted); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; }
.tabs a.active, .tabs a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.count { color: var(--muted); font-family: var(--mono); font-size: .8rem; margin-left: 4px; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; background: #1d2738; color: #c3cad8; white-space: nowrap; }
.status-new { background: rgba(94,234,212,.15); color: var(--accent); }
.status-reviewing { background: rgba(251,191,36,.15); color: var(--amber); }
.status-fits, .status-won, .fit-ok.pill { background: rgba(74,222,128,.15); color: var(--green); }
.status-counter, .fit-close.pill { background: rgba(251,191,36,.15); color: var(--amber); }
.status-lost, .fit-gap.pill { background: rgba(248,113,113,.15); color: var(--red); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.panel { margin-bottom: 20px; padding: 22px; }
.panel h2 { font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; color: #c3cad8; font-size: .94rem; }
.scroll-box { max-height: 480px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.fit { padding: 10px 14px; border-radius: 8px; font-weight: 500; }
.fit.fit-ok { background: rgba(74,222,128,.1); color: var(--green); }
.fit.fit-close { background: rgba(251,191,36,.1); color: var(--amber); }
.fit.fit-gap { background: rgba(248,113,113,.1); color: var(--red); }
.stack .btn { margin-top: 4px; }
.reply { border-top: 1px solid var(--line); padding: 10px 0; }
.reply summary { cursor: pointer; font-size: .9rem; }
code { font-family: var(--mono); color: var(--accent); }

/* responsive */
@media (max-width: 980px) {
  .hero-grid, .feature-grid, .form-wrap, .detail-grid { grid-template-columns: 1fr; }
  .cards, .pillars, .steps { grid-template-columns: 1fr 1fr; }
  .branch-figure, .form-intro { position: static; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav:not(.site-nav-static) { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 20px; }
  .site-nav.open { display: flex; }
  .site-nav:not(.site-nav-static) a { padding: 12px 0; }
  .cards, .pillars, .steps, .row, .row-3 { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .inquiry { padding: 20px; }
  .log li { grid-template-columns: 44px 1fr; }
  .log .a { display: none; }
  .search input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .log li { opacity: 1; }
  .branch-figure .runs path { stroke-dashoffset: 0; }
}
