:root{
  --bg: #ffffff;
  --soft: #f6f7fb;
  --ink: #0f172a;
  --muted: rgba(15,23,42,.72);
  --muted2: rgba(15,23,42,.56);
  --line: rgba(15,23,42,.10);

  --brand: #16a34a;
  --brand2: #22c55e;
  --blue: #2563eb;
  --amber: #f59e0b;

  --r: 16px;
  --r2: 22px;

  --shadow: 0 10px 26px rgba(15,23,42,.08);
  --shadow2: 0 18px 44px rgba(15,23,42,.10);

  --max: 1140px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html, body{ height: 100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* Top strip */
.strip{
  background: #0b1220;
  color: rgba(255,255,255,.90);
}
.strip-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.strip-left{ display:flex; align-items:center; gap: 10px; min-width:0; }
.strip-text{ color: rgba(255,255,255,.72); white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.strip-link{
  color: rgba(255,255,255,.92);
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
}
.strip-link:hover{ text-decoration:none; filter: brightness(1.05); }

.pill{
  display:inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(34,197,94,.16);
  border: 1px solid rgba(34,197,94,.22);
}

/* Header */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width:0;
}
.brand-logo{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 950;
  letter-spacing: .03em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: var(--shadow);
}
.brand-logo.small{ width: 36px; height: 36px; border-radius: 14px; }

.brand-name{
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
}
.tld{ color: rgba(15,23,42,.50); }

.nav{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-link{
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 750;
}
.nav-link:hover{
  text-decoration:none;
  background: rgba(37,99,235,.08);
  color: var(--ink);
}

.header-actions{
  display:flex;
  align-items:center;
  gap: 10px;
}
.btn{
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.btn:hover{ filter: brightness(0.99); }
.btn.primary{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.14);
}
.btn.subtle{
  background: rgba(15,23,42,.04);
}
.menu{ display:none; }

/* Mobile nav */
.mobile{
  padding: 0 0 14px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mobile .strong{ font-weight: 900; color: rgba(37,99,235,.92); }

/* Search */
.search{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: none;
  align-items: start;
  justify-content: center;
  padding: 90px 20px 20px;
  z-index: 80;
}
.search.open{ display:flex; }
.search-dialog{
  width: min(680px, 100%);
  background: #fff;
  border-radius: var(--r2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow2);
  padding: 14px;
}
.search-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 6px 6px 10px;
}
.x{
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15,23,42,.04);
  padding: 8px 10px;
  cursor: pointer;
}
.search-input{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.16);
  padding: 12px 12px;
  font-size: 1rem;
  outline: none;
}
.search-input:focus{ border-color: rgba(34,197,94,.55); box-shadow: 0 0 0 4px rgba(34,197,94,.14); }
.hint{ margin: 10px 6px 0; color: var(--muted2); }

/* Hero */
.hero{
  padding: 34px 0 18px;
  background:
    radial-gradient(900px 320px at 50% 0%, rgba(34,197,94,.12), transparent 60%),
    radial-gradient(900px 320px at 90% 20%, rgba(37,99,235,.10), transparent 60%);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  align-items: center;
}
.kicker{
  display:inline-block;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .80rem;
  color: rgba(15,23,42,.58);
  margin-bottom: 10px;
}
h1{
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 3.3vw, 3.0rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.lede{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 70ch;
}

.hero-ctas{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
  box-shadow: var(--shadow);
}
.cta:hover{ text-decoration:none; filter: brightness(0.99); }
.cta.primary{
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(34,197,94,.10));
  border-color: rgba(34,197,94,.35);
}
.cta.ghost{
  background: rgba(15,23,42,.04);
}

.trust{
  display:flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-weight: 650;
}
.trust-item{
  display:flex;
  align-items:center;
  gap: 8px;
}
.dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: rgba(34,197,94,.90);
  box-shadow: 0 0 0 4px rgba(34,197,94,.14);
}

/* Scene card */
.scene-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: var(--shadow2);
  overflow: hidden;
}
.scene-top{
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(15,23,42,.02);
}
.scene-title{ font-weight: 950; letter-spacing: -0.01em; }
.scene-meta{ color: var(--muted2); font-size: .95rem; margin-top: 4px; }

.illustration{
  position: relative;
  height: 150px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(500px 200px at 30% 20%, rgba(34,197,94,.14), transparent 60%),
              radial-gradient(500px 200px at 70% 40%, rgba(37,99,235,.10), transparent 60%),
              var(--soft);
  overflow:hidden;
}
.blob{
  position:absolute;
  border-radius: 999px;
  filter: blur(.2px);
}
.b1{ width: 120px; height: 120px; left: -30px; top: 30px; background: rgba(34,197,94,.18); }
.b2{ width: 140px; height: 140px; right: -40px; top: -30px; background: rgba(37,99,235,.16); }
.b3{ width: 90px; height: 90px; left: 45%; top: 70px; background: rgba(245,158,11,.14); }

.stack{
  position:absolute;
  left: 26px;
  top: 28px;
  width: 160px;
  height: 100px;
}
.sheet{
  position:absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  box-shadow: 0 10px 20px rgba(15,23,42,.08);
}
.s1{ transform: rotate(-6deg) translateY(4px); opacity: .95; }
.s2{ transform: rotate(2deg) translateX(10px) translateY(0px); opacity: .92; }
.s3{ transform: rotate(10deg) translateX(18px) translateY(-2px); opacity: .88; }

.badge-pill{
  position:absolute;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.04);
}
.p1{ width: 90px; right: 18px; top: 40px; }
.p2{ width: 120px; right: 28px; top: 68px; }
.p3{ width: 70px; right: 22px; top: 96px; }

.scene-list{
  list-style:none;
  margin: 0;
  padding: 10px;
}
.scene-list li{ margin: 8px; }
.scene-list a{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.02);
}
.scene-list a:hover{
  text-decoration:none;
  border-color: rgba(34,197,94,.28);
  background: rgba(34,197,94,.08);
}
.scene-list .t{ font-weight: 850; }
.scene-list .m{ color: var(--muted2); font-size: .95rem; }

.scene-foot{
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
.scene-link{
  color: rgba(37,99,235,.92);
  font-weight: 850;
}

/* Sections */
.section{ padding: 26px 0; }
.section.soft{ background: var(--soft); border-top: 1px solid rgba(15,23,42,.06); border-bottom: 1px solid rgba(15,23,42,.06); }

.section-head{
  display:grid;
  gap: 6px;
  margin-bottom: 14px;
}
.section-head.row{
  display:flex;
  align-items:end;
  justify-content: space-between;
  gap: 14px;
}
.section-head h2{ margin: 0; letter-spacing: -0.02em; }
.section-head p{ margin: 0; color: var(--muted2); max-width: 75ch; }
.link{ color: rgba(37,99,235,.92); font-weight: 850; }

/* Learning paths */
.path-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.path-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  padding: 16px;
}
.path-icon{
  width: 46px; height: 46px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.18);
  margin-bottom: 10px;
}
.path-card h3{ margin: 0 0 8px; letter-spacing: -0.01em; }
.path-card p{ margin: 0 0 12px; color: var(--muted); }

.path-meta{ display:flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.02);
  color: rgba(15,23,42,.72);
  font-weight: 750;
  font-size: .88rem;
}
.path-cta{
  color: rgba(37,99,235,.92);
  font-weight: 850;
}

/* Topics */
.topic-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.topic{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: 0 10px 22px rgba(15,23,42,.06);
  padding: 14px;
  display:grid;
  gap: 6px;
}
.topic:hover{
  text-decoration:none;
  border-color: rgba(37,99,235,.20);
  background: rgba(37,99,235,.06);
}
.topic-k{
  font-size: .80rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(15,23,42,.55);
  font-weight: 900;
}
.topic-t{ font-weight: 900; letter-spacing: -0.01em; }

/* Templates */
.template-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.template{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  padding: 14px;
  display:grid;
  gap: 8px;
}
.template:hover{
  text-decoration:none;
  border-color: rgba(34,197,94,.28);
  background: rgba(34,197,94,.06);
}
.template-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.file{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.02);
  font-weight: 850;
  font-size: .88rem;
}
.time{ color: var(--muted2); font-weight: 750; font-size: .92rem; }
.template-title{ font-weight: 950; letter-spacing: -0.01em; }
.template-desc{ color: var(--muted); }

/* Glossary */
.gloss-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gloss{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: 0 10px 22px rgba(15,23,42,.06);
  padding: 14px;
  display:grid;
  gap: 6px;
}
.gloss:hover{
  text-decoration:none;
  border-color: rgba(37,99,235,.20);
  background: rgba(37,99,235,.06);
}
.gloss span{ color: var(--muted2); }

/* Footer */
.footer{
  padding: 26px 0 22px;
  border-top: 1px solid var(--line);
}
.footer-inner{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  align-items:start;
}
.foot-brand{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-bottom: 10px;
}
.foot-title{ font-weight: 950; letter-spacing: -0.02em; }
.foot-sub{ color: var(--muted2); }
.foot-note{ margin: 0; color: var(--muted); max-width: 70ch; }

.foot-cols{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.col{ display:grid; gap: 8px; }
.col strong{ font-weight: 950; }
.col a{ color: var(--muted); }
.col a:hover{ color: rgba(37,99,235,.92); text-decoration:none; }

.foot-bottom{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,.10);
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted2);
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .path-grid{ grid-template-columns: 1fr; }
  .topic-grid{ grid-template-columns: 1fr; }
  .template-grid{ grid-template-columns: 1fr 1fr; }
  .gloss-grid{ grid-template-columns: 1fr 1fr; }
  .footer-inner{ grid-template-columns: 1fr; }
  .foot-cols{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .nav{ display:none; }
  .menu{ display:inline-flex; }
}
@media (max-width: 520px){
  .template-grid{ grid-template-columns: 1fr; }
  .gloss-grid{ grid-template-columns: 1fr; }
  .strip-right{ display:none; }
}
