/* NilaGPT pre-launch site.
   Aesthetic: moonlit intelligence. Midnight indigo ground, warm Nila gold,
   soft teal. Fraunces for warmth, Manrope for clarity, JetBrains Mono for
   technical labels. Product mockups render on a warm light surface so the app
   reads as real. Technical pages use clean light diagram cards. */

:root {
  --bg: #0c1023;
  --bg-2: #11162f;
  --surface: #161c3a;
  --surface-2: #1c2347;
  --ink: #eef1fb;
  --ink-dim: #aeb4d0;
  --ink-faint: #6f76a0;
  --gold: #f0b35b;
  --gold-soft: #f8d09a;
  --teal: #6fd0c4;
  --line: rgba(255,255,255,0.09);
  --line-soft: rgba(255,255,255,0.05);
  --glow: rgba(240,179,91,0.16);

  --app-bg: #f7f4ec;
  --app-card: #ffffff;
  --app-ink: #20253a;
  --app-dim: #6a6f82;
  --app-line: #e9e3d4;
  --app-gold: #d99327;
  --app-teal: #2f9c8f;
  --app-indigo: #3a4a8c;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }

.bgfx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 620px at 82% -8%, var(--glow), transparent 60%),
    radial-gradient(520px 520px at 8% 4%, rgba(111,208,196,0.08), transparent 60%),
    var(--bg);
}
.bgfx::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 22%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 45% 60%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 88% 70%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.25), transparent);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
section { padding: 86px 0; }
.section-tight { padding: 56px 0; }

header.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px);
  background: rgba(12,16,35,0.72); border-bottom: 1px solid var(--line-soft);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; flex-direction: column; line-height: 1.05; text-decoration: none; }
.logo .name { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--ink); letter-spacing: -0.01em; }
.logo .name b { color: var(--gold); font-weight: 600; }
.logo .tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 2px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--ink-dim); text-decoration: none; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta { font-family: var(--sans); font-weight: 600; font-size: 14px; background: var(--gold); color: #2a1c05; padding: 9px 18px; border-radius: 999px; text-decoration: none; transition: transform .12s, box-shadow .2s; box-shadow: 0 6px 20px -8px var(--gold); }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -8px var(--gold); }

.btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--sans); font-weight: 600; font-size: 15.5px; padding: 14px 26px; border-radius: 999px; text-decoration: none; cursor: pointer; border: none; transition: transform .12s, box-shadow .2s, background .2s; }
.btn-primary { background: var(--gold); color: #2a1c05; box-shadow: 0 10px 30px -10px var(--gold); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--gold); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); margin-bottom: 16px; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 6vw, 66px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 22px; }
h1 .accent { color: var(--gold); font-style: italic; }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 18px; }
h3 { font-family: var(--sans); font-weight: 700; font-size: 20px; margin: 0 0 10px; }
p { margin: 0 0 18px; color: var(--ink-dim); }
.lede { font-size: clamp(18px, 2.4vw, 23px); line-height: 1.55; color: var(--ink); }
.muted { color: var(--ink-faint); }
.center { text-align: center; }
.measure { max-width: 680px; }
.measure.center { margin-left: auto; margin-right: auto; }

.hero { padding: 96px 0 70px; position: relative; }
.moon { width: 132px; height: 132px; border-radius: 50%; margin-bottom: 30px; background: radial-gradient(circle at 64% 36%, var(--gold-soft), var(--gold) 42%, #b07a23 100%); box-shadow: 0 0 70px -6px var(--glow), inset -16px -10px 36px rgba(0,0,0,0.35); position: relative; }
.moon::after { content:""; position:absolute; top:18%; left:22%; width:18px; height:18px; border-radius:50%; background: rgba(0,0,0,0.07); box-shadow: 30px 26px 0 -4px rgba(0,0,0,0.06), 14px 56px 0 -2px rgba(0,0,0,0.05); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.hero-note { font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint); margin-top: 18px; }

.story { border-left: 2px solid var(--gold); padding: 6px 0 6px 26px; margin: 0 0 26px; font-family: var(--serif); font-size: clamp(20px, 2.6vw, 26px); font-style: italic; line-height: 1.45; color: var(--ink); }

.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 14px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.pillar .ic { font-family: var(--mono); font-size: 12px; color: var(--teal); letter-spacing: 0.1em; margin-bottom: 12px; }
.pillar h3 { font-size: 18px; }
.pillar p { font-size: 15px; margin: 0; }

.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row.flip > div:first-child { order: 2; }

.browser { background: var(--app-bg); border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,0,0,0.3); }
.browser .bar { background: #e7e1d2; padding: 11px 14px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--app-line); }
.browser .dot { width: 11px; height: 11px; border-radius: 50%; background: #c9c1ad; }
.browser .url { margin-left: 12px; font-family: var(--mono); font-size: 11px; color: #8a8470; background: #fff; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--app-line); }
.screen { padding: 26px; color: var(--app-ink); }

.phone { width: 300px; margin: 0 auto; background: #0a0d18; border-radius: 36px; padding: 12px; border: 1px solid rgba(255,255,255,0.16); box-shadow: 0 40px 90px -30px rgba(0,0,0,0.75); }
.phone .screen { background: var(--app-bg); border-radius: 26px; padding: 20px 18px; }

.app-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.app-logo { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--app-ink); }
.app-logo b { color: var(--app-gold); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; color: #fff; flex: 0 0 38px; }
.avatar.sanjana { background: linear-gradient(135deg, #f0a93e, #e06a3f); }
.avatar.nila { background: linear-gradient(135deg, #3a4a8c, #2f9c8f); }

.bubble { max-width: 84%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; margin-bottom: 12px; }
.bubble.them { background: #fff; border: 1px solid var(--app-line); color: var(--app-ink); border-bottom-left-radius: 5px; }
.bubble.me { background: var(--app-indigo); color: #fff; margin-left: auto; border-bottom-right-radius: 5px; }
.bubble .sub { display: block; font-size: 12px; color: var(--app-dim); margin-top: 4px; font-style: italic; }
.bubble.me .sub { color: rgba(255,255,255,0.7); }
.chat-row { display: flex; gap: 10px; align-items: flex-end; }

.rolecards { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.rolecard { background: #fff; border: 1px solid var(--app-line); border-radius: 14px; padding: 18px 14px; text-align: center; }
.rolecard.sel { border-color: var(--app-gold); box-shadow: 0 0 0 2px rgba(217,147,39,0.25); }
.rolecard .em { font-size: 26px; }
.rolecard .lbl { font-weight: 700; font-size: 14px; color: var(--app-ink); margin-top: 6px; }
.rolecard .d { font-size: 11.5px; color: var(--app-dim); }

.agui-card { background: #fff; border: 1px solid var(--app-line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.agui-card .title { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--app-teal); margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.agui-card .title::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--app-teal); }

.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th, .cmp td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--app-line); color: var(--app-ink); }
.cmp th { font-family: var(--mono); font-size: 10px; text-transform: uppercase; color: var(--app-dim); }
.cmp td.k { color: var(--app-dim); }

.timeline { display: flex; justify-content: space-between; position: relative; padding: 10px 4px 4px; }
.timeline::before { content:""; position:absolute; top: 17px; left: 14px; right: 14px; height: 2px; background: var(--app-line); }
.tnode { position: relative; text-align: center; flex: 1; }
.tnode .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--app-gold); margin: 0 auto 8px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--app-line); }
.tnode.done .dot { background: var(--app-teal); }
.tnode .yr { font-family: var(--mono); font-size: 10px; color: var(--app-dim); }
.tnode .ev { font-size: 11px; color: var(--app-ink); margin-top: 2px; }

.caption-strip { background: #11162f; border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.caption-strip .lang { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.caption-strip .ta { color: #fff; font-size: 15px; line-height: 1.5; }
.caption-strip .en { color: var(--ink-faint); font-size: 12.5px; margin-top: 4px; }
.wave { display: flex; gap: 3px; align-items: flex-end; height: 34px; margin: 6px 0 2px; }
.wave i { width: 4px; background: var(--app-gold); border-radius: 2px; animation: w 1.1s ease-in-out infinite; }
@keyframes w { 0%,100%{height:8px} 50%{height:30px} }
.langtoggle { display: flex; gap: 8px; margin-top: 10px; }
.pill { font-family: var(--mono); font-size: 10.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--app-line); color: var(--app-dim); background:#fff; }
.pill.on { background: var(--app-indigo); color: #fff; border-color: var(--app-indigo); }

.report .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.report .badge { font-family: var(--mono); font-size: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(47,156,143,0.14); color: var(--app-teal); }
.report ul { margin: 0; padding-left: 18px; }
.report li { font-size: 13.5px; color: var(--app-ink); margin-bottom: 6px; }

.radar { display: block; margin: 0 auto; }
.step-k { font-family: var(--mono); font-size: 13px; color: var(--gold); letter-spacing: 0.08em; margin-bottom: 8px; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; position: relative; }
.plan.feat { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 30px 60px -30px var(--glow); }
.plan .ptag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.plan.feat .ptag { color: var(--gold); }
.plan h3 { font-family: var(--serif); font-size: 26px; margin: 10px 0 4px; }
.plan .price { font-family: var(--mono); font-size: 14px; color: var(--ink-faint); margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; }
.plan li { padding: 9px 0 9px 26px; position: relative; font-size: 14.5px; color: var(--ink-dim); border-top: 1px solid var(--line-soft); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 10px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.plan li.off { color: var(--ink-faint); }
.plan li.off::before { border-color: var(--ink-faint); opacity: 0.4; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px; max-width: 560px; margin: 0 auto; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-dim); margin-bottom: 7px; }
.field input, .field select, .field textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; color: var(--ink); font-family: var(--sans); font-size: 15px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 84px; }
.form-msg { margin-top: 14px; font-size: 14px; min-height: 20px; }
.form-msg.ok { color: var(--teal); }
.form-msg.err { color: #f0856b; }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label { flex: 1; min-width: 120px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 12px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-dim); }
.choice input { display: none; }
.choice label:has(input:checked) { border-color: var(--gold); background: rgba(240,179,91,0.08); color: var(--gold); }

.aud-banner { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.aud-banner .k { font-family: var(--mono); font-size: 12px; color: var(--teal); letter-spacing: 0.14em; text-transform: uppercase; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; }
.subnav a { font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); text-decoration: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; transition: border-color .15s, color .15s; }
.subnav a:hover { border-color: var(--teal); color: var(--ink); }
.subnav a.active { color: var(--gold); border-color: var(--gold); }

.diagram { background: #f4f6fb; border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; padding: 26px; box-shadow: 0 30px 70px -34px rgba(0,0,0,0.7); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram-cap { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-top: 14px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.choice-card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 14px; padding: 22px; }
.choice-card .lab { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.choice-card h3 { font-size: 17px; }
.choice-card p { font-size: 14.5px; margin: 0; }
.choice-card .val { display: block; margin-top: 10px; font-size: 13px; color: var(--gold-soft); }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 14px; padding: 20px 24px; margin: 26px 0; }
.callout .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 6px; }
.callout p { margin: 0; color: var(--ink); }

.cta-band { background: linear-gradient(135deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--line); border-radius: 22px; padding: 56px 40px; text-align: center; }

footer { border-top: 1px solid var(--line-soft); padding: 46px 0 60px; }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { font-size: 14px; color: var(--ink-dim); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-fine { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-top: 18px; }

.rise { opacity: 0; transform: translateY(16px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.d1{animation-delay:.05s}.d2{animation-delay:.14s}.d3{animation-delay:.23s}.d4{animation-delay:.32s}
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .pillars, .plan-grid, .choices, .feature-row { grid-template-columns: 1fr; }
  .feature-row { gap: 30px; }
  .feature-row.flip > div:first-child { order: 0; }
  .rolecards { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
}

/* Engineering page additions */
.codeblock { background: #0a0d1c; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 0 0 22px; }
.codeblock pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.72; color: #cdd3ea; white-space: pre; }
.codeblock .cap { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .06em; margin-bottom: 12px; display: block; }
.proof { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0; }
.proof .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; flex: 1; min-width: 150px; }
.proof .num { font-family: var(--serif); font-size: 32px; color: var(--gold); line-height: 1; }
.proof .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }
.tree { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-dim); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; white-space: pre; overflow-x: auto; margin: 0 0 22px; }
.tree .d { color: var(--gold-soft); }

/* ======================================================================
   Real-app mockup styling, matched to the original product UI
   (indigo primary, emerald + sky accents, slate neutrals, white cards).
   These override the earlier warm app palette so the in-frame screens
   read as authentic screenshots of the actual application.
   ====================================================================== */
:root {
  --app-bg: #f8fafc;
  --app-card: #ffffff;
  --app-ink: #0f172a;
  --app-dim: #64748b;
  --app-line: #e2e8f0;
  --app-line-soft: #eef2f7;
  --app-indigo: #4f46e5;
  --app-indigo-2: #6366f1;
  --app-indigo-deep: #312e81;
  --app-emerald: #10b981;
  --app-sky: #0ea5e9;
}
.browser { background: var(--app-bg); }
.browser .bar { background: #eef2f7; border-bottom: 1px solid var(--app-line); }
.browser .dot { background: #cbd5e1; }
.browser .url { color: #64748b; background: #fff; border-color: var(--app-line); }
.phone .screen { background: var(--app-bg); }
.app-logo b { color: var(--app-indigo); }
.avatar.nila { background: linear-gradient(135deg, #6366f1, #312e81); }
.avatar.sanjana { background: linear-gradient(135deg, #38bdf8, #10b981); }
.bubble.them { background: #fff; border: 1px solid var(--app-line); color: var(--app-ink); }
.bubble.me { background: var(--app-indigo); color: #fff; }
.bubble .sub { color: #94a3b8; }
.bubble.me .sub { color: rgba(255,255,255,0.78); }
.agui-card { background: #fff; border: 1px solid var(--app-line-soft); border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,0.06); }
.agui-card .title { color: #64748b; }
.agui-card .title::before { background: var(--app-indigo); }
.cmp th { background: #f8fafc; color: #334155; }
.cmp td, .cmp th { border-bottom: 1px solid var(--app-line-soft); color: #475569; }
.cmp td.k { color: #0f172a; font-weight: 600; }
.cmp .col-b { color: var(--app-indigo); }
.cmp .col-a { color: var(--app-sky); }
.timeline::before { background: var(--app-line); }
.timeline .tnode .dot { background: var(--app-indigo); }
.timeline .tnode.done .dot { background: var(--app-emerald); }
.rolecard { background: #fff; border: 1px solid var(--app-line); }
.rolecard.sel { border-color: var(--app-indigo); box-shadow: 0 0 0 2px rgba(79,70,229,0.18); }
.report .badge { background: rgba(16,185,129,0.12); color: #059669; }
.pill.on { background: var(--app-indigo); border-color: var(--app-indigo); }

/* App dashboard hero (dark indigo gradient), pill, status, charts */
.app-hero { background: linear-gradient(135deg, #312e81, #1e293b 58%, #312e81); border-radius: 18px; padding: 24px; color: #fff; position: relative; overflow: hidden; margin-bottom: 14px; }
.app-hero .blob { position: absolute; top: -50px; right: -40px; width: 200px; height: 200px; background: rgba(99,102,241,0.3); border-radius: 50%; filter: blur(44px); }
.app-pill { display: inline-flex; align-items: center; gap: 7px; font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #c7d2fe; background: rgba(99,102,241,0.28); border: 1px solid rgba(129,140,248,0.4); padding: 5px 12px; border-radius: 999px; position: relative; z-index: 1; }
.app-hero h3 { font-family: var(--sans); font-size: 23px; font-weight: 800; color: #fff; margin: 14px 0 8px; line-height: 1.16; position: relative; z-index: 1; }
.app-hero .em-accent { color: #34d399; }
.app-hero .sky-accent { background: linear-gradient(90deg, #38bdf8, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-hero p { color: #cbd5e1; font-size: 13px; margin: 0 0 16px; position: relative; z-index: 1; }
.app-hero .cta { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #312e81; font-weight: 700; font-size: 13px; padding: 10px 20px; border-radius: 999px; position: relative; z-index: 1; }
.app-status { display: inline-flex; align-items: center; gap: 6px; font: 700 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: #34d399; margin-bottom: 10px; position: relative; z-index: 1; }

.barchart { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding: 6px 4px 0; }
.barchart .grp { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.barchart .bars { display: flex; gap: 5px; align-items: flex-end; height: 100%; }
.barchart .bar { width: 16px; border-radius: 4px 4px 0 0; }
.barchart .b-a { background: #0ea5e9; }
.barchart .b-b { background: #6366f1; }
.barchart .xl { font: 500 10px var(--mono); color: #94a3b8; margin-top: 6px; }
.chart-legend { display: flex; gap: 16px; margin-top: 10px; font: 500 11px var(--sans); color: #64748b; }
.chart-legend .k { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 10px; height: 10px; border-radius: 3px; }

/* ======================================================================
   Under the Hood sub-navigation, redesigned as a prominent tab bar.
   ====================================================================== */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 40px; padding: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.subnav a { flex: 1 1 auto; text-align: center; font: 600 13.5px var(--sans); color: var(--ink-dim); text-decoration: none; padding: 12px 16px; border-radius: 10px; border: none; letter-spacing: 0; transition: color .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.subnav a:hover { color: var(--ink); background: var(--surface-2); border: none; }
.subnav a.active { color: #2a1c05; background: var(--gold); border: none; box-shadow: 0 8px 22px -10px var(--gold); }
@media (max-width: 880px) { .subnav a { flex: 1 1 44%; } }

/* Engineering: grouped Code subsection */
.code-group { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 24px 24px 6px; margin-top: 14px; }
.code-group .codeblock:last-child, .code-group .tree:last-child { margin-bottom: 18px; }

/* ======================================================================
   Community Edition: value-slashed-to-free, and the join options.
   ====================================================================== */
.value-row { display: flex; align-items: baseline; gap: 14px; margin: 6px 0 22px; flex-wrap: wrap; }
.value-was { font-family: var(--mono); font-size: 16px; color: var(--ink-faint); text-decoration: line-through; }
.value-free { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--gold); line-height: 1; }
.value-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.free-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #2a1c05; background: var(--gold); padding: 7px 16px; border-radius: 999px; font-weight: 700; }

.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; margin: 0 auto; }
.join-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; text-align: center; display: flex; flex-direction: column; }
.join-card .jic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 16px; }
.join-card .jic.li { background: rgba(99,102,241,0.16); }
.join-card .jic.ml { background: rgba(111,208,196,0.16); }
.join-card h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 8px; }
.join-card p { font-size: 14.5px; color: var(--ink-dim); margin: 0 0 20px; flex: 1; }
.join-card .btn { width: 100%; justify-content: center; }

.mail-draft { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; text-align: left; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink-dim); white-space: pre-wrap; margin: 16px 0 12px; }
.copy-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.copy-msg { font-size: 13px; color: var(--teal); min-height: 18px; margin-top: 10px; text-align: center; }
@media (max-width: 880px) { .join-grid { grid-template-columns: 1fr; } }

/* Tentative stack tag */
.tentative { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); background: rgba(240,179,91,0.1); border: 1px solid rgba(240,179,91,0.35); padding: 7px 14px; border-radius: 999px; }
.tentative svg { flex: 0 0 auto; }

/* AGUI highlight */
.agui-tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; color: var(--teal); background: rgba(111,208,196,0.1); border: 1px solid rgba(111,208,196,0.32); padding: 5px 12px; border-radius: 999px; }
.agui-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
mark.agui { background: linear-gradient(transparent 58%, rgba(240,179,91,0.42) 0); color: inherit; padding: 0 1px; }

/* Three-way comparison cards (deep research) */
.compare3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 12px; }
.c3 { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--surface); }
.c3.dim { background: transparent; }
.c3 .h { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.c3.feat { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 30px 60px -34px var(--glow); }
.c3.feat .h { color: var(--gold); }
.c3 h3 { font-size: 17px; margin: 0 0 8px; }
.c3 p { font-size: 14px; color: var(--ink-dim); margin: 0; }
@media (max-width: 880px) { .compare3 { grid-template-columns: 1fr; } }

/* Email join modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(6,8,18,0.72); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 36px 16px; z-index: 100; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px; max-width: 560px; width: 100%; position: relative; }
.modal h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.modal .close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--ink-dim); font-size: 26px; cursor: pointer; line-height: 1; padding: 4px; }
.modal .close:hover { color: var(--ink); }
.modal .preview { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.62; color: var(--ink-dim); white-space: pre-wrap; max-height: 200px; overflow-y: auto; margin: 16px 0 14px; }
.modal .preview .pl { color: var(--ink-faint); }
.modal .btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.modal .btn-row .btn { flex: 1 1 auto; }
.btn-sm { font-size: 13px; padding: 10px 16px; }
