:root {
  --ink: #101114;
  --muted: #666b74;
  --faint: #9ba1aa;
  --line: #e5e7eb;
  --soft: #f5f6f7;
  --paper: #fff;
  --accent: #e23b33;
  --accent-soft: #fff0ee;
  --accent-ink: #a62923;
  --radius: 16px;
  --shell: 1180px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.product-fathom {
  --accent: #3158d4;
  --accent-soft: #eef2ff;
  --accent-ink: #2444ad;
}

.product-factor {
  --accent: #ef4a23;
  --accent-soft: #fff1ec;
  --accent-ink: #b72d0f;
}

.product-mech {
  --accent: #0f766e;
  --accent-soft: #e7f8f5;
  --accent-ink: #0b5953;
}

.shell { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.topbar .shell { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.product-factor .brand-mark { border-radius: 6px; transform: rotate(-4deg); }
.product-mech .brand-mark { border-radius: 4px; background: var(--ink); color: #7ee0d7; }
.brand small { color: var(--faint); font-size: 10px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.navlinks { display: flex; align-items: center; gap: 26px; color: #565b64; font-size: 14px; }
.navlinks a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.menu-button { display: none; border: 0; background: transparent; padding: 8px; font-size: 20px; }

.btn { display: inline-flex; min-height: 44px; padding: 0 18px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 720; cursor: pointer; }
.btn:hover { border-color: #c8ccd2; transform: translateY(-1px); }
.btn-primary { color: #fff; border-color: var(--ink); background: var(--ink); }
.btn-accent { color: #fff; border-color: var(--accent); background: var(--accent); }
.btn-small { min-height: 36px; padding: 0 13px; font-size: 12px; border-radius: 8px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.hero { min-height: 690px; display: grid; grid-template-columns: minmax(0, .94fr) minmax(430px, 1.06fr); gap: 76px; align-items: center; padding: 78px 0 90px; }
.hero h1 { margin: 22px 0 22px; max-width: 700px; font-size: clamp(56px, 6.2vw, 88px); line-height: .94; letter-spacing: -.065em; }
.hero-copy { max-width: 600px; color: var(--muted); font-size: 19px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.truth { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.truth span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #6a7079; background: #fff; font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }

.hero-system { position: relative; min-height: 470px; display: grid; align-content: center; }
.system-frame { position: relative; padding: 24px; border: 1px solid #dadde2; border-radius: 24px; background: linear-gradient(145deg, #fff, #f6f7f8); box-shadow: 0 28px 80px rgba(20,24,32,.08); overflow: hidden; }
.system-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.7) 50%, transparent 65%); transform: translateX(-100%); animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 0%,65% { transform: translateX(-100%); } 90%,100% { transform: translateX(100%); } }
.system-top { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.system-stack { display: grid; gap: 10px; padding-top: 20px; }
.system-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; min-height: 68px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.86); }
.system-row .num { color: var(--faint); font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.system-row b { display: block; font-size: 14px; }
.system-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.system-row code { color: var(--accent-ink); background: var(--accent-soft); padding: 6px 8px; border-radius: 6px; font-size: 10px; }
.product-mech .system-frame { background: #111416; color: #f4f6f7; border-color: #252b2f; box-shadow: 0 28px 80px rgba(3,20,19,.2); }
.product-mech .system-top { border-color: #2d3438; }
.product-mech .system-row { border-color: #2e363a; background: #171b1e; }
.product-mech .system-row p { color: #9ca8ad; }

.section { padding: 104px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, .95fr) minmax(280px, .55fr); gap: 70px; align-items: end; margin-bottom: 52px; }
.section h2 { margin: 16px 0 0; font-size: clamp(38px, 4.7vw, 66px); line-height: 1; letter-spacing: -.05em; }
.section-intro { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card { min-height: 250px; padding: 30px 26px 34px; border-right: 1px solid var(--line); }
.card:last-child { border-right: 0; }
.card .index { color: var(--accent); font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.card h3 { margin: 62px 0 10px; font-size: 22px; letter-spacing: -.025em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.role-card { padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.role-card.accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, #fff); }
.role-label { display: inline-flex; padding: 6px 8px; border-radius: 6px; background: var(--soft); color: var(--muted); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; }
.role-card.accent .role-label { color: var(--accent-ink); background: rgba(255,255,255,.72); }
.role-card h3 { margin: 28px 0 12px; font-size: 30px; letter-spacing: -.04em; }
.role-card p { color: var(--muted); line-height: 1.65; }
.role-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.role-list li { padding-top: 12px; border-top: 1px solid rgba(120,125,135,.2); font-size: 13px; }
.role-list b { display: block; margin-bottom: 4px; }

.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.proof { min-height: 160px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.proof span { color: var(--faint); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.proof b { display: block; margin-top: 42px; font-size: 17px; }
.proof p { color: var(--muted); font-size: 12px; line-height: 1.5; }

.close { padding: 110px 0; border-top: 1px solid var(--line); }
.close-box { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; padding: 44px; border-radius: 22px; color: #fff; background: var(--ink); }
.close h2 { margin: 12px 0 0; max-width: 780px; font-size: clamp(42px, 5vw, 68px); line-height: .98; letter-spacing: -.055em; }
.close .eyebrow { color: color-mix(in srgb, var(--accent) 75%, white); }
.close-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.close .btn { border-color: rgba(255,255,255,.25); color: #fff; background: transparent; }
.close .btn-accent { background: var(--accent); border-color: var(--accent); }

.footer { padding: 32px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer .shell { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

/* Console prototype */
.console-body { background: #f7f8f9; min-height: 100vh; }
.console-top { height: 66px; border-bottom: 1px solid var(--line); background: #fff; }
.console-top .shell { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.prototype-chip { padding: 6px 8px; border-radius: 999px; color: var(--accent-ink); background: var(--accent-soft); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .06em; }
.console-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 66px); }
.console-nav { padding: 24px 14px; border-right: 1px solid var(--line); background: #fff; }
.console-nav-label { padding: 8px 12px 12px; color: var(--faint); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .12em; }
.console-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px; border-radius: 8px; color: #646a73; font-size: 13px; font-weight: 650; }
.console-nav a:hover { background: var(--soft); color: var(--ink); }
.console-nav a.active { color: var(--ink); background: var(--accent-soft); }
.console-nav a.active::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.console-main { width: min(100%, 1180px); padding: 42px 42px 70px; }
.view { display: none; }
.view.active { display: block; }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.view-head h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.view-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.metric { min-height: 118px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.metric .value { font-size: 28px; font-weight: 760; letter-spacing: -.04em; }
.metric .label { margin-top: 34px; color: var(--muted); font-size: 11px; }
.panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.panel-head { min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-head b { font-size: 13px; }
.panel-body { padding: 20px; }
.empty-state { min-height: 220px; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.empty-state div { max-width: 470px; }
.empty-state h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.03em; }
.empty-state p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--faint); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; text-align: left; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td code { font-size: 11px; }
.tag { display: inline-flex; padding: 5px 7px; border-radius: 6px; color: var(--muted); background: var(--soft); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.tag.accent { color: var(--accent-ink); background: var(--accent-soft); }
.builder { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-card { min-height: 172px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.field-card span { color: var(--faint); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.field-card h3 { margin: 40px 0 7px; font-size: 17px; }
.field-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.flow-step { position: relative; min-height: 120px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.flow-step:not(:last-child)::after { content: "→"; position: absolute; right: -8px; top: 50%; z-index: 2; width: 16px; color: var(--faint); background: #f7f8f9; text-align: center; }
.flow-step small { color: var(--accent); font-weight: 800; }
.flow-step b { display: block; margin-top: 36px; font-size: 13px; }
.flow-step p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.notice { margin-bottom: 18px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); border-radius: 9px; color: var(--accent-ink); background: var(--accent-soft); font-size: 11px; line-height: 1.5; }

@media (max-width: 900px) {
  .navlinks { display: none; position: absolute; top: 64px; left: 24px; right: 24px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.12); }
  .navlinks.open { display: grid; gap: 6px; }
  .navlinks a { padding: 10px; }
  .menu-button { display: block; }
  .nav-actions .btn:not(.btn-primary):not(.btn-accent) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 46px; min-height: auto; padding-top: 68px; }
  .hero-system { min-height: auto; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .card:last-child { border-bottom: 0; }
  .card h3 { margin-top: 36px; }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .console-shell { grid-template-columns: 1fr; }
  .console-nav { position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; overflow-x: auto; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .console-nav-label { display: none; }
  .console-nav a { white-space: nowrap; }
  .console-main { padding: 30px 20px 60px; }
  .metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .topbar { height: 64px; }
  .brand small { display: none; }
  .hero { padding: 54px 0 70px; }
  .hero h1 { font-size: 50px; }
  .hero-copy { font-size: 16px; }
  .system-frame { padding: 14px; border-radius: 18px; }
  .system-row { grid-template-columns: 26px 1fr; }
  .system-row code { display: none; }
  .section { padding: 76px 0; }
  .section h2 { font-size: 42px; }
  .split, .builder { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .close-box { grid-template-columns: 1fr; padding: 30px 24px; }
  .close-actions { justify-content: flex-start; }
  .footer .shell { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 104px; }
  .metric .label { margin-top: 24px; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow-step:nth-child(2)::after { display: none; }
  .view-head { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .system-frame::after { display: none; }
  .btn:hover { transform: none; }
}
