/* ==========================================================================
   LMS Cloud Open Source — design system
   ========================================================================== */

:root {
  --bg:            #05080f;
  --bg-2:          #080d1a;
  --surface:       rgba(255,255,255,.028);
  --surface-2:     rgba(255,255,255,.05);
  --border:        rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);

  --ink:           #eaf1ff;
  --ink-2:         #a9b6cf;
  --ink-3:         #71809b;

  --cyan:          #3ec6f4;
  --blue:          #2f6df6;
  --violet:        #8b6cff;
  --green:         #37d6a0;
  --amber:         #f5b657;

  --grad:          linear-gradient(120deg, #7be3ff 0%, #38b6f5 38%, #2f6df6 74%, #8b6cff 100%);
  --grad-soft:     linear-gradient(120deg, rgba(123,227,255,.16), rgba(47,109,246,.16));

  --radius:        18px;
  --radius-sm:     12px;
  --radius-lg:     28px;

  --shadow:        0 24px 60px -28px rgba(3,8,22,.9);
  --glow:          0 0 0 1px rgba(62,198,244,.25), 0 20px 60px -24px rgba(47,109,246,.55);

  --maxw:          1180px;
  --font:          "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:          "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif:         Georgia, "Times New Roman", serif;

  --ease:          cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 78% -8%, rgba(47,109,246,.22), transparent 60%),
    radial-gradient(700px 520px at 8% 4%, rgba(62,198,244,.14), transparent 58%),
    radial-gradient(820px 700px at 50% 120%, rgba(139,108,255,.12), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

::selection { background: rgba(62,198,244,.3); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

/* ---------------------------------- type --------------------------------- */
h1,h2,h3,h4 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.05rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p  { margin: 0 0 1.1em; color: var(--ink-2); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 62ch; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--grad); display: inline-block;
}
.eyebrow.center { justify-content: center; }

/* -------------------------------- section -------------------------------- */
.section { padding: clamp(64px, 9vw, 122px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: 54px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.section-head.center .eyebrow { justify-content: center; }

/* --------------------------------- header -------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  backdrop-filter: blur(16px);
  background: rgba(5,8,15,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(5,8,15,.9); }
.header-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 34px; height: auto; }
.brand .word { font-family: var(--serif); font-size: 1.24rem; letter-spacing: .2px; }
.brand .oss {
  font-family: var(--font); font-size: .62rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 8px;
  background: var(--grad-soft);
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav a {
  padding: 8px 12px; border-radius: 9px; font-size: .92rem; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* audience switch */
.audience-toggle {
  display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); position: relative;
}
.audience-toggle button {
  position: relative; z-index: 1; border: 0; background: transparent; color: var(--ink-3);
  padding: 7px 15px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  letter-spacing: .01em; transition: color .25s var(--ease); display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 96px;
}
.audience-toggle button svg { width: 15px; height: 15px; }
.audience-toggle button[aria-pressed="true"] { color: #fff; }
.audience-toggle .thumb {
  position: absolute; top: 4px; left: 4px; height: calc(100% - 8px); width: calc(50% - 4px);
  border-radius: 999px; background: var(--grad); z-index: 0;
  transition: transform .32s var(--ease); box-shadow: 0 6px 18px -6px rgba(47,109,246,.8);
}
[data-audience="technical"] .audience-toggle .thumb { transform: translateX(100%); }

/* mobile nav */
.nav-toggle { display: none; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 10px; color: var(--ink); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .25s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

/* -------------------------------- buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .94rem;
  border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .3s var(--ease), background .25s, border-color .25s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #041018; box-shadow: 0 14px 34px -16px rgba(47,109,246,.9); }
.btn-primary:hover { box-shadow: 0 20px 44px -16px rgba(47,109,246,1); }
.btn-ghost { border-color: var(--border-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,.3); }
.btn-sm { padding: 9px 16px; font-size: .86rem; }

/* --------------------------------- hero ---------------------------------- */
.hero { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 84px); position: relative; }
.hero .container { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: .55em; }
.hero .lead { font-size: clamp(1.06rem, 1.7vw, 1.28rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: var(--ink-3); font-size: .84rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--green); }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-size: .76rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2);
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.chip.violet .dot { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.chip.green  .dot { background: var(--green);  box-shadow: 0 0 10px var(--green); }
.chip.amber  .dot { background: var(--amber);  box-shadow: 0 0 10px var(--amber); }

/* terminal */
.terminal {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(8,13,26,.96), rgba(5,8,15,.96));
  box-shadow: var(--shadow); overflow: hidden; font-family: var(--mono);
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.tdot { width: 11px; height: 11px; border-radius: 50%; }
.tdot.r { background: #ff5f57; } .tdot.y { background: #febc2e; } .tdot.g { background: #28c840; }
.terminal-title { margin-left: 8px; font-size: .76rem; color: var(--ink-3); letter-spacing: .04em; }
.terminal-body { padding: 18px 20px; font-size: .82rem; line-height: 1.85; overflow-x: auto; }
.terminal-body .ln { white-space: pre; display: block; }
.t-prompt { color: var(--green); }
.t-cmd { color: var(--ink); }
.t-dim { color: var(--ink-3); }
.t-cyan { color: var(--cyan); }
.t-blue { color: #6ea8ff; }
.t-violet { color: #b6a2ff; }
.t-key { color: var(--amber); }
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--cyan); vertical-align: text-bottom; margin-left: 2px; animation: blink 1.05s steps(2) infinite; }
@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* -------------------------------- stats ---------------------------------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: rgba(8,13,26,.72); padding: 26px 22px; }
.stat .num { font-size: clamp(1.5rem,2.6vw,2.1rem); font-weight: 700; letter-spacing: -.03em; }
.stat .lbl { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }

/* --------------------------------- cards --------------------------------- */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }

.card {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  padding: 26px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0; transition: opacity .3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card:hover::after { opacity: .5; }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--border-strong); margin-bottom: 18px;
}
.card .ico svg { width: 22px; height: 22px; color: var(--cyan); }
.card .tag { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.card .tag.violet { color: var(--violet); }
.card .tag.green { color: var(--green); }

.pill-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { font-size: .78rem; color: var(--ink-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; background: var(--surface); }

/* numbered feature */
.feature { display: flex; gap: 18px; }
.feature .n {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: .95rem; color: var(--cyan);
  border: 1px solid var(--border-strong); background: var(--surface-2);
}

/* --------------------------------- code ---------------------------------- */
pre, code, kbd { font-family: var(--mono); }
code { font-size: .86em; background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; color: #cfe0ff; }
pre {
  margin: 0; padding: 20px 22px; background: #060a14; border: 1px solid var(--border);
  border-radius: var(--radius); overflow-x: auto; font-size: .82rem; line-height: 1.8; color: #cfe0ff;
}
pre code { background: none; border: 0; padding: 0; color: inherit; }

/* --------------------------------- table --------------------------------- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 620px; }
thead th { text-align: left; padding: 14px 18px; background: rgba(255,255,255,.035); color: var(--ink); font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
tbody td { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--ink-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
td code, th code { font-size: .8em; }
.mono-cell { font-family: var(--mono); color: #cfe0ff; font-size: .84rem; }

/* --------------------------------- tabs ---------------------------------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  border-radius: 10px; padding: 9px 16px; font-size: .88rem; font-weight: 600; transition: .22s;
}
.tab:hover { color: var(--ink); border-color: var(--border-strong); }
.tab[aria-selected="true"] { color: #041018; background: var(--grad); border-color: transparent; }
.tab-panel[hidden] { display: none; }

/* ------------------------------- modules --------------------------------- */
.module-card { display: flex; flex-direction: column; }
.module-card .module-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.module-card .code { font-family: var(--mono); font-weight: 700; font-size: .95rem; }
.status { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid; }
.status.core { color: var(--green); border-color: rgba(55,214,160,.4); background: rgba(55,214,160,.09); }
.status.beta { color: var(--amber); border-color: rgba(245,182,87,.4); background: rgba(245,182,87,.09); }
.status.plan { color: var(--ink-3); border-color: var(--border); background: var(--surface); }
.module-card dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .82rem; }
.module-card dt { color: var(--ink-3); }
.module-card dd { margin: 0; color: var(--ink-2); }

/* ------------------------------ architecture ----------------------------- */
.arch-diagram { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; background: radial-gradient(120% 120% at 50% 0%, rgba(47,109,246,.12), transparent 60%), rgba(8,13,26,.6); }
.layer { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; position: relative; }
.layer:last-child { margin-bottom: 0; }
.layer .layer-label { position: absolute; top: -11px; left: 18px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); background: var(--bg-2); padding: 0 8px; }
.layer .layer-title { font-weight: 700; margin-bottom: 8px; }
.layer .layer-sub { font-size: .82rem; color: var(--ink-3); }
.pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; margin-top: 10px; }
.node { border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .82rem; }
.node b { display: block; font-family: var(--mono); font-size: .82rem; color: #cfe0ff; font-weight: 600; }
.node span { color: var(--ink-3); font-size: .76rem; }
.node.hl { border-color: rgba(62,198,244,.42); background: rgba(62,198,244,.08); }
.layer.db { border-style: solid; border-color: rgba(62,198,244,.45); background: rgba(62,198,244,.05); }
.flow-arrow { text-align: center; color: var(--ink-3); margin: 2px 0; font-size: 1.1rem; }

/* principles */
.principle { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; padding: 26px 0; border-bottom: 1px solid var(--border); }
.principle:last-child { border-bottom: 0; }
.principle .letter {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.7rem; font-weight: 800; background: var(--grad-soft); border: 1px solid var(--border-strong);
  background-clip: padding-box;
}
.principle .letter span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.principle h3 { margin-bottom: .3em; }
.principle p { margin-bottom: 0; }
.principle .impl { margin-top: .6em; font-size: .87rem; color: var(--ink-3); }
.principle .impl b { color: var(--cyan); font-weight: 600; }

/* comparison */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare .col { border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.compare .col.old { opacity: .82; }
.compare .col.new { border-color: rgba(62,198,244,.4); background: rgba(62,198,244,.05); }
.compare h3 { display: flex; align-items: center; gap: 10px; }
.compare ul { list-style: none; margin: 0; padding: 0; }
.compare li { padding: 9px 0 9px 30px; position: relative; color: var(--ink-2); border-bottom: 1px solid rgba(255,255,255,.05); font-size: .92rem; }
.compare li:last-child { border-bottom: 0; }
.compare li::before { position: absolute; left: 2px; top: 9px; font-size: .95rem; }
.compare .old li::before { content: "✕"; color: #ff6b6b; }
.compare .new li::before { content: "✓"; color: var(--green); }

/* --------------------------------- repos --------------------------------- */
.repo {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 0; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  display: flex; flex-direction: column;
}
.repo-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--border); }
.repo-head .name { font-family: var(--mono); font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 10px; }
.repo-head .name svg { width: 18px; height: 18px; color: var(--ink-3); }
.repo-body { padding: 20px 24px; flex: 1; }
.repo-stack { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.repo-tree { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); line-height: 1.7; background: #060a14; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; white-space: pre; }
.repo-tree .d { color: #6ea8ff; } .repo-tree .f { color: var(--ink-2); }
.repo-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.repo-stats { display: flex; gap: 16px; font-size: .76rem; color: var(--ink-3); }
.repo-stats span { display: inline-flex; align-items: center; gap: 5px; }
.repo-stats svg { width: 13px; height: 13px; }

/* --------------------------------- CTA ----------------------------------- */
.cta-band {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: clamp(36px,6vw,64px);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(139,108,255,.2), transparent 55%),
    radial-gradient(90% 140% at 0% 100%, rgba(62,198,244,.18), transparent 55%),
    rgba(8,13,26,.7);
  text-align: center;
}
.cta-band h2 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.cta-band .hero-cta { justify-content: center; }

/* -------------------------------- footer --------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 34px; margin-top: 40px; background: rgba(4,7,13,.6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
.footer-brand p { font-size: .88rem; max-width: 34ch; }
.footer-col h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: .9rem; color: var(--ink-2); transition: color .2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); }

/* ------------------------------ animations ------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------- audience visibility ------------------------- */
[data-audience="business"] [data-only="technical"] { display: none !important; }
[data-audience="technical"] [data-only="business"] { display: none !important; }

/* persona label pill shown in hero */
.persona-note { font-size: .8rem; color: var(--ink-3); margin-top: 28px; }
.persona-note b { color: var(--cyan); }

/* ------------------------------- lenses ---------------------------------- */
.lens { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008)); }
.lens-top { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--border); font-size: .82rem; color: var(--ink-3); }
.lens-top .mode-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px rgba(62,198,244,.8); }
.lens-top b { color: var(--ink); font-weight: 600; }
.lens-body { padding: 22px; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.kpi { background: rgba(8,13,26,.8); padding: 18px; }
.kpi .v { font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.kpi .k { font-size: .76rem; color: var(--ink-3); margin-top: 3px; }
.kpi .delta { font-size: .72rem; color: var(--green); margin-top: 6px; }
.kpi .delta.warn { color: var(--amber); }
.bars { margin-top: 22px; display: grid; gap: 14px; }
.bar-row .bar-head { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-2); margin-bottom: 6px; }
.bar-row .bar-head span:last-child { color: var(--ink-3); font-family: var(--mono); font-size: .76rem; }
.bar-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--grad); }
.bar-fill.alt { background: linear-gradient(90deg, #8b6cff, #3ec6f4); }
.legend { display: flex; gap: 18px; margin-top: 20px; font-size: .78rem; color: var(--ink-3); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.finding { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 9px; font-size: .86rem; }
.finding:last-child { margin-bottom: 0; }
.finding .f-name { font-family: var(--mono); font-size: .82rem; color: #cfe0ff; }
.finding .f-state { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.f-state.under { color: var(--amber); background: rgba(245,182,87,.1); border: 1px solid rgba(245,182,87,.35); }
.f-state.over { color: #ff8f8f; background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.35); }
.f-state.none { color: var(--cyan); background: rgba(62,198,244,.1); border: 1px solid rgba(62,198,244,.35); }
.f-state.ok { color: var(--green); background: rgba(55,214,160,.1); border: 1px solid rgba(55,214,160,.35); }

/* --------------------------- duality components -------------------------- */
.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; }
.mode-block { position: relative; }
.mode-flag { display:inline-flex; align-items:center; gap:7px; font-size:.72rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); margin-bottom:16px; }
.mode-flag::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--grad); }

.checklist { list-style:none; margin:0; padding:0; }
.checklist li { position:relative; padding:11px 0 11px 32px; border-bottom:1px solid rgba(255,255,255,.06); color:var(--ink-2); font-size:.92rem; }
.checklist li:last-child { border-bottom:0; }
.checklist li::before { content:"✓"; position:absolute; left:4px; top:11px; color:var(--green); font-weight:700; }
.checklist li .owner { color:var(--ink-3); font-size:.78rem; }
.checklist li b { color:var(--ink); }

.timeline { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:8px; }
.tl-step { position:relative; border:1px solid var(--border); border-radius:14px; padding:18px 16px; background:var(--surface); }
.tl-step .n { font-family:var(--mono); font-size:.78rem; color:var(--cyan); font-weight:700; }
.tl-step h4 { margin:8px 0 4px; font-size:.98rem; }
.tl-step p { font-size:.82rem; margin:0; }
.tl-step::after { content:"→"; position:absolute; right:-11px; top:50%; transform:translateY(-50%); color:var(--ink-3); font-size:.9rem; }
.tl-step:last-child::after { display:none; }

.risk-grid { display:grid; grid-template-columns:auto 1fr 1fr; grid-template-rows:auto 1fr 1fr; gap:9px; }
.risk-axis { font-size:.7rem; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); display:flex; align-items:center; justify-content:center; text-align:center; }
.risk-cell { border:1px solid var(--border); border-radius:12px; padding:12px 13px; font-size:.8rem; color:var(--ink-2); background:var(--surface); }
.risk-cell b { display:block; color:var(--ink); font-size:.82rem; margin-bottom:3px; }
.risk-cell .mono-cell { font-size:.72rem; }
.risk-cell.high { background:rgba(255,107,107,.08); border-color:rgba(255,107,107,.32); }
.risk-cell.med  { background:rgba(245,182,87,.08); border-color:rgba(245,182,87,.32); }
.risk-cell.low  { background:rgba(55,214,160,.07); border-color:rgba(55,214,160,.28); }

.pack { list-style:none; margin:0; padding:0; display:grid; gap:9px; }
.pack li { display:flex; gap:12px; align-items:flex-start; border:1px solid var(--border); border-radius:12px; padding:13px 15px; background:var(--surface); font-size:.88rem; color:var(--ink-2); }
.pack li .pk { flex:0 0 auto; font-family:var(--mono); font-size:.72rem; color:var(--cyan); border:1px solid var(--border-strong); border-radius:6px; padding:2px 7px; margin-top:1px; }
.pack li b { color:var(--ink); }

.plan-tree, .call-trace { font-family:var(--mono); font-size:.78rem; line-height:1.9; background:#060a14; border:1px solid var(--border); border-radius:12px; padding:16px 18px; overflow-x:auto; color:var(--ink-2); white-space:pre; }
.plan-tree .node, .call-trace .fn { color:#cfe0ff; }
.plan-tree .cost, .call-trace .ms { color:var(--amber); }
.call-trace .bar { display:inline-block; height:7px; border-radius:4px; background:var(--grad); vertical-align:middle; margin-left:8px; }

.payback-chart { border:1px solid var(--border); border-radius:14px; padding:20px 18px 12px; background:var(--surface); }
.pb-cols { display:flex; align-items:flex-end; gap:6px; height:150px; position:relative; }
.pb-cols .col { flex:1; background:var(--grad-soft); border:1px solid var(--border); border-bottom:0; border-radius:6px 6px 0 0; position:relative; }
.pb-cols .col.pos { background:linear-gradient(180deg,rgba(55,214,160,.5),rgba(55,214,160,.12)); border-color:rgba(55,214,160,.35); }
.pb-break { position:absolute; top:-8px; bottom:-8px; width:0; border-left:2px dashed var(--cyan); }
.pb-break span { position:absolute; top:-20px; left:8px; font-size:.7rem; color:var(--cyan); white-space:nowrap; }
.pb-axis { display:flex; justify-content:space-between; font-size:.72rem; color:var(--ink-3); margin-top:10px; }

.screenshot-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.shot { border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface); }
.shot .frame { aspect-ratio:16/10; position:relative; background:
  radial-gradient(120% 120% at 20% 0%, rgba(62,198,244,.22), transparent 55%),
  radial-gradient(120% 120% at 100% 100%, rgba(139,108,255,.2), transparent 55%),
  linear-gradient(180deg, rgba(8,13,26,.9), rgba(5,8,15,.95));
  display:grid; place-items:center; }
.shot .frame .glyph { font-family:var(--mono); font-size:.74rem; color:var(--ink-3); border:1px dashed var(--border-strong); border-radius:8px; padding:8px 12px; }
.shot figcaption { padding:12px 15px; font-size:.82rem; color:var(--ink-2); border-top:1px solid var(--border); }
.shot figcaption b { color:var(--ink); display:block; font-size:.86rem; }
.shot figcaption .mono-cell { font-size:.72rem; }

.repo-feature { grid-column:1 / -1; }
.repo-feature-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:28px; padding:24px; }
.repo-feature .feature-list { list-style:none; margin:16px 0 0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 22px; }
.repo-feature .feature-list li { position:relative; padding:6px 0 6px 24px; font-size:.86rem; color:var(--ink-2); }
.repo-feature .feature-list li::before { content:"✓"; position:absolute; left:2px; color:var(--green); font-weight:700; }
.maturity-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }

/* ------------------------------- responsive ------------------------------ */
@media (max-width: 1080px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(3,1fr); }
  .g-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .g-3 { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr; }
  .nav.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: rgba(6,9,17,.98); border-bottom: 1px solid var(--border); padding: 14px 26px 22px; gap: 2px;
  }
  .nav.open a { padding: 12px 8px; font-size: 1rem; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .header-actions .btn { display: none; }
  .audience-toggle button { padding: 7px 11px; font-size: .76rem; }
  .brand .oss { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .principle { grid-template-columns: 1fr; gap: 12px; }
}
