:root {
  --ink: #121417;
  --paper: #f6f4ef;
  --paper-2: #ebe7de;
  --panel: rgba(255, 255, 255, .72);
  --dark: #0e1412;
  --deep: #17211e;
  --line: rgba(18, 20, 23, .12);
  --line-dark: rgba(255, 255, 255, .14);
  --text: #1b1f22;
  --muted: #66706d;
  --mint: #33c58e;
  --teal: #1d9386;
  --blue: #4d8fff;
  --amber: #d99a2b;
  --coral: #e76f51;
  --max: 1320px;
  --radius: 8px;
  --shadow: 0 22px 70px rgba(15, 23, 21, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(140deg, rgba(51, 197, 142, .12), transparent 28%),
    linear-gradient(315deg, rgba(231, 111, 81, .08), transparent 26%),
    var(--paper);
  letter-spacing: 0;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.section { padding: 92px 0; }
.section-band { padding: 72px 0 96px; }
.section-muted { background: linear-gradient(180deg, rgba(255,255,255,.54), rgba(235,231,222,.68)); }
.section-deep {
  color: #f4f6f3;
  background:
    linear-gradient(135deg, rgba(51,197,142,.16), transparent 30%),
    linear-gradient(315deg, rgba(77,143,255,.13), transparent 36%),
    var(--deep);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(18,20,23,.09);
  background: rgba(246,244,239,.84);
}
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--mint), #b7ee78);
  color: #07110d;
  box-shadow: 0 12px 32px rgba(51,197,142,.28);
}
.nav-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 14px; }
.nav-links a { text-decoration: none; transition: color .2s ease; }
.nav-links a:hover { color: var(--teal); }
.nav-toggle { display: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 850;
  line-height: 1;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--mint), #b8ec72); color: #08100c; box-shadow: 0 18px 46px rgba(51,197,142,.28); }
.btn-soft { border-color: rgba(29,147,134,.24); background: rgba(255,255,255,.72); color: var(--teal); }
.btn-outline { border-color: rgba(18,20,23,.14); background: rgba(255,255,255,.52); }

.hero { color: #f4f6f3; background: radial-gradient(circle at 78% 18%, rgba(51,197,142,.22), transparent 32%), radial-gradient(circle at 18% 80%, rgba(231,111,81,.16), transparent 28%), var(--dark); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(420px, .72fr); gap: 44px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: 12px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.section-deep .eyebrow, .hero .eyebrow { color: #7ff0bf; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 910px; margin-bottom: 24px; font-size: clamp(42px, 5.2vw, 78px); line-height: .96; letter-spacing: 0; }
h2 { max-width: 950px; margin-bottom: 18px; font-size: clamp(30px, 3.4vw, 52px); line-height: 1.04; letter-spacing: 0; }
h3 { margin-bottom: 10px; font-size: 19px; }
p { color: var(--muted); line-height: 1.72; }
.hero p, .section-deep p { color: rgba(244,246,243,.75); }
.lead { max-width: 840px; font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 24px; }
.hero-tags, .pain-panel, .knowledge-stack, .loop-strip, .role-grid, .semantic-list { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-tags span, .pain-panel span, .knowledge-stack span, .loop-strip span, .role-grid span, .semantic-list span {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(244,246,243,.78);
  font-size: 13px;
}
.product-visual {
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.05));
  box-shadow: 0 34px 100px rgba(0,0,0,.36);
}
.dashboard { padding: 20px; }
.dashboard-top { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-dark); color: rgba(244,246,243,.72); }
.dashboard-top strong { color: #7ff0bf; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dashboard-metrics div {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(7, 13, 11, .44);
}
.dashboard-metrics b { display: block; margin-bottom: 8px; color: #7ff0bf; font-size: 34px; }
.dashboard-metrics span { color: rgba(244,246,243,.62); font-size: 13px; }
.factory-timeline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0; color: rgba(244,246,243,.68); font-size: 12px; }
.factory-timeline i { display: inline-flex; width: 22px; height: 1px; background: var(--mint); animation: flowPulse 3.8s ease-in-out infinite; }
.work-queue { display: grid; gap: 10px; }
.work-queue div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
}
.work-queue b { color: #8bdcff; font-size: 13px; }
.work-queue em { color: rgba(244,246,243,.56); font-size: 12px; }

.section-head { max-width: 980px; margin-bottom: 34px; }
.section-head p { max-width: 880px; }
.value-grid, .cards, .process-grid, .gate-grid, .review-board, .cms-grid, .analytics-grid, .scenario-grid, .pricing-grid, .risk-grid, .step-grid, .economics-grid, .format-grid {
  display: grid;
  gap: 16px;
}
.value-grid { grid-template-columns: repeat(3, 1fr); }
.cards-four, .review-board, .scenario-grid, .format-grid, .risk-grid, .step-grid { grid-template-columns: repeat(4, 1fr); }
.gate-grid, .cms-grid, .economics-grid, .pricing-grid { grid-template-columns: repeat(3, 1fr); }
.analytics-grid { grid-template-columns: repeat(5, 1fr); }
.cards article, .value-grid article, .process-grid article, .gate-grid article, .review-board article, .cms-grid article, .analytics-grid article, .scenario-grid article, .pricing-grid article, .risk-grid article, .step-grid article, .economics-grid article, .format-grid article {
  min-height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(18,20,23,.07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.cards article:hover, .value-grid article:hover, .process-grid article:hover, .gate-grid article:hover, .review-board article:hover, .cms-grid article:hover, .analytics-grid article:hover, .scenario-grid article:hover, .pricing-grid article:hover, .risk-grid article:hover, .step-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(51,197,142,.42);
  box-shadow: var(--shadow);
}
.section-deep article { background: rgba(255,255,255,.07); border-color: var(--line-dark); box-shadow: none; }
.section-deep article:hover { border-color: rgba(127,240,191,.42); }
.split { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .84fr); gap: 44px; align-items: start; }
.pain-panel { padding: 24px; border-radius: var(--radius); background: var(--deep); box-shadow: var(--shadow); }
.process-grid { grid-template-columns: repeat(7, minmax(136px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
.process-grid article { min-width: 136px; }
.process-grid b, .step-grid b { display: inline-flex; margin-bottom: 12px; color: var(--amber); font-size: 22px; }
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(105px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.workflow-node {
  min-height: 112px;
  display: grid;
  align-content: center;
  text-align: center;
  padding: 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255,255,255,.07);
  color: #f4f6f3;
  transition: transform .2s ease, background .2s ease;
}
.workflow-node:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); }
.workflow-node small { color: rgba(244,246,243,.62); }
.workflow-node.agent { border-color: rgba(127,240,191,.42); }
.workflow-node.guard { border-color: rgba(217,154,43,.48); }
.cluster-map {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cluster-map span, .schema-card span, .link-panel a {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
}
.schema-card { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.planning-table, .fact-matrix { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.74); box-shadow: var(--shadow); }
.planning-table .row { display: grid; grid-template-columns: 1.2fr .85fr .85fr .7fr .7fr; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.planning-table .row.head { color: var(--text); font-weight: 900; background: rgba(51,197,142,.1); }
.code-panel { padding: 24px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgba(0,0,0,.2); }
.code-panel pre { margin: 0; white-space: pre-wrap; color: #9ef3c7; line-height: 1.8; }
.knowledge-stack { padding: 24px; border-radius: var(--radius); background: var(--deep); }
.link-panel { display: grid; gap: 10px; }
.link-panel a { color: var(--teal); text-decoration: none; font-weight: 850; transition: transform .2s ease, border-color .2s ease; }
.link-panel a:hover { transform: translateX(3px); border-color: var(--teal); }
.loop-strip { padding: 24px; border-radius: var(--radius); background: var(--deep); }
.fact-matrix { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact-matrix span { padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.analytics-grid article b { display: block; color: var(--teal); font-size: 28px; }
.analytics-grid article span { color: var(--muted); }
.role-grid { padding: 24px; border-radius: var(--radius); background: var(--deep); }
.pricing-grid article a { display: inline-flex; margin-top: 10px; color: var(--teal); font-weight: 900; text-decoration: none; }
.pricing-grid article a.card-cta {
  inline-size: fit-content;
  padding: 12px 15px;
  color: var(--teal);
}
.semantic-list { padding: 24px; border-radius: var(--radius); background: var(--deep); }

.faq-list { display: grid; gap: 12px; }
details {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 32px rgba(18,20,23,.06);
}
summary { color: var(--text); cursor: pointer; font-weight: 900; font-size: 18px; }
details p { margin: 14px 0 0; }
.cta-section { padding: 96px 0; color: #f4f6f3; background: radial-gradient(circle at 74% 24%, rgba(51,197,142,.22), transparent 30%), var(--dark); }
.cta-panel {
  padding: 42px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255,255,255,.07);
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  text-align: center;
}
.cta-panel h2, .cta-panel p { margin-left: auto; margin-right: auto; }
.site-footer { padding: 58px 0; color: rgba(244,246,243,.75); background: #0b0f0e; }
.footer-grid { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 28px; }
.footer-grid h3 { color: #f4f6f3; }
.footer-grid a { display: block; margin-bottom: 10px; color: rgba(244,246,243,.82); text-decoration: none; transition: color .2s ease; }
.footer-grid a:hover { color: #7ff0bf; }
.footer-grid a.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: fit-content;
  padding: 11px 14px;
  border: 1px solid rgba(127,240,191,.34);
  border-radius: 999px;
  background: rgba(127,240,191,.12);
  color: #7ff0bf;
  font-weight: 850;
}
.footer-brand { margin-bottom: 14px; color: #f4f6f3; }

.legal-page { background: var(--paper); }
.legal-hero { padding: 70px 0 36px; }
.legal-card {
  max-width: 920px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.legal-card h1 { color: var(--text); font-size: clamp(34px, 4vw, 58px); }
.legal-card h2 { margin-top: 28px; font-size: 28px; }
.legal-card ul { color: var(--muted); line-height: 1.7; }

@keyframes flowPulse {
  0%, 100% { opacity: .35; transform: scaleX(.82); }
  50% { opacity: 1; transform: scaleX(1); }
}

@media (max-width: 1180px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .value-grid, .cards-four, .review-board, .scenario-grid, .format-grid, .risk-grid, .step-grid, .gate-grid, .cms-grid, .economics-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: repeat(3, 1fr); }
  .process-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
  .workflow-grid { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
}

@media (max-width: 820px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .section { padding: 64px 0; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.64);
    font-weight: 850;
  }
  .nav-links {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 78px;
    display: none;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(246,244,239,.96);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: grid; }
  .site-header .btn-outline { display: none; }
  h1 { font-size: clamp(36px, 12vw, 56px); }
  h2 { font-size: clamp(28px, 9vw, 42px); }
  .hero-grid { gap: 28px; }
  .product-visual { min-width: 0; }
  .dashboard-metrics, .value-grid, .cards-four, .review-board, .scenario-grid, .format-grid, .risk-grid, .step-grid, .gate-grid, .cms-grid, .economics-grid, .pricing-grid, .analytics-grid, .cluster-map, .footer-grid { grid-template-columns: 1fr; }
  .planning-table .row { grid-template-columns: 1fr; }
  .work-queue div { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-panel .btn { inline-size: 100%; }
}
