:root {
  --bg: #131019;
  --bg-2: #1c1925;
  --bg-3: #262232;
  --text: #f5f1ea;
  --muted: #a59fb2;
  --faint: #6f6980;
  --coral: #ff5c35;
  --coral-soft: rgba(255, 92, 53, 0.14);
  --cream: #f5f1ea;
  --blue: #6db3f2;
  --green: #7fd6a8;
  --border: rgba(245, 241, 234, 0.10);
  --border-2: rgba(245, 241, 234, 0.18);
  --radius: 14px;
  --maxw: 1320px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}

code {
  font-family: var(--mono);
}

/* keep wide code blocks from forcing horizontal page overflow on any screen */
.hero,
.hero-copy,
.hero-visual,
.code-card,
.pair,
.pair>*,
.demo-stage,
.demo-meters,
.demo-codes,
.meter,
.lesson,
.lesson-body,
.steps,
.step,
.problem-card,
.feature,
main {
  min-width: 0;
}

pre.code {
  max-width: 100%;
}

/* custom scrollbar: thin, elegant, our coral, instead of the browser default */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--coral) transparent;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--coral);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff7a52;
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(19, 16, 25, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(19, 16, 25, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.brand img {
  border-radius: 8px;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}

.nav a {
  color: var(--muted);
  transition: color .2s;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* custom language dropdown (fully styled, unlike a native select popup) */
.lang-dd {
  position: relative;
}

.lang-dd-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 8px 13px 8px 15px;
  font: 600 13px var(--sans);
  cursor: pointer;
  transition: border-color .2s;
}

.lang-dd-btn:hover {
  border-color: var(--coral);
}

.lang-dd-btn svg {
  color: var(--coral);
  transition: transform .25s;
}

.lang-dd.open .lang-dd-btn {
  border-color: var(--coral);
}

.lang-dd.open .lang-dd-btn svg {
  transform: rotate(180deg);
}

.lang-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--border-radius-md, 10px);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, .85);
}

.lang-dd.open .lang-dd-menu {
  display: flex;
  animation: ddin .16s ease;
}

@keyframes ddin {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.lang-dd-opt {
  text-align: left;
  background: none;
  border: 0;
  color: var(--muted);
  font: 600 14px var(--sans);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.lang-dd-opt:hover {
  background: var(--bg-3);
  color: var(--text);
}

.lang-dd-opt.active {
  color: var(--coral);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .12s, background .2s, border-color .2s;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: var(--coral);
  color: #fff;
}

.btn-primary:hover {
  background: #ff6f4d;
}

.btn-ghost {
  border: 1px solid var(--border-2);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--coral);
  color: var(--coral);
}

/* ---------- layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.section {
  padding: clamp(60px, 9vw, 110px) 0;
  border-top: 1px solid var(--border);
}

.kicker {
  color: var(--coral);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.section h2 {
  font-size: clamp(23px, 2.6vw, 31px);
  max-width: 22ch;
}

.section-lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 62ch;
  margin: 18px 0 0;
}

.section-lead.center,
h2+.hero-cta.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0;
}

/* Corner "flashes": soft radial glows that pulse in a staggered loop. Built
   from radial-gradients (no blur filter) and animated only on opacity/scale,
   so they stay smooth and never thrash the compositor. */
/* break out of the centered container to the full viewport, so the corner
   flashes sit at the real screen edges on large screens. */
.hero-bg {
  position: absolute;
  top: -48px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: calc(100% + 96px);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg span {
  position: absolute;
  width: 40vw;
  height: 40vw;
  min-width: 320px;
  min-height: 320px;
  border-radius: 50%;
  opacity: 0;
  will-change: opacity;
}

.hero-bg span:nth-child(1) {
  top: -16vw;
  left: -14vw;
  background: radial-gradient(circle, rgba(255, 92, 53, .55), transparent 64%);
  animation: flash 6.5s ease-in-out infinite;
}

.hero-bg span:nth-child(2) {
  top: -16vw;
  right: -14vw;
  background: radial-gradient(circle, rgba(109, 74, 242, .50), transparent 64%);
  animation: flash 6.5s ease-in-out infinite 1.6s;
}

.hero-bg span:nth-child(3) {
  bottom: -16vw;
  left: -14vw;
  background: radial-gradient(circle, rgba(255, 138, 92, .45), transparent 64%);
  animation: flash 6.5s ease-in-out infinite 3.2s;
}

.hero-bg span:nth-child(4) {
  bottom: -16vw;
  right: -14vw;
  background: radial-gradient(circle, rgba(255, 92, 53, .50), transparent 64%);
  animation: flash 6.5s ease-in-out infinite 4.8s;
}

@keyframes flash {

  0%,
  100% {
    opacity: .05;
  }

  45% {
    opacity: .55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg span {
    animation: none;
    opacity: .14;
  }
}

/* light from above: a soft beam at the top that fades downward, so the glow
   reflects into the page instead of being cut off by a hard line */
.hero-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 60%;
  background: radial-gradient(ellipse at top, rgba(255, 138, 92, .16), transparent 62%);
}

/* no hard divider right under the hero; let the light bleed into the page */
#what {
  border-top: none;
}

.badge {
  display: inline-block;
  background: var(--coral-soft);
  color: var(--coral);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
}

.hero .tagline {
  font-size: 18px;
  color: var(--text);
  margin: 22px 0 0;
  max-width: 46ch;
}

.hero .lead {
  font-size: 16px;
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-cta.center {
  justify-content: center;
}

.arrow-down {
  text-align: center;
  color: var(--coral);
  font-size: 22px;
  margin: 8px 0;
  opacity: .8;
}

/* ---------- code cards ---------- */
.code-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px -28px rgba(0, 0, 0, .7);
}

.code-card.small {
  transform: scale(.97);
  opacity: .95;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, .02);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.r {
  background: #ff5f56;
}

.dot.a {
  background: #ffbd2e;
}

.dot.g {
  background: #27c93f;
}

.code-head .file {
  margin-left: auto;
  color: var(--faint);
  font: 500 12px var(--mono);
}

.code-head .lbl {
  font: 700 12px var(--sans);
  letter-spacing: .02em;
  padding: 3px 10px;
  border-radius: 999px;
}

.ks-lbl {
  background: var(--coral-soft);
  color: var(--coral);
}

.js-lbl {
  background: rgba(109, 179, 242, .16);
  color: var(--blue);
}

.ts-lbl {
  background: rgba(127, 214, 168, .16);
  color: var(--green);
}

pre.code {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font: 500 13.5px/1.65 var(--mono);
  color: var(--cream);
}

pre.code.js,
pre.code.ts {
  color: #cfcad9;
}

/* Full programs in the "See the code" section can be long, so let them scroll
   inside the card instead of stretching the page. */
.example-pane pre.code {
  max-height: 460px;
  overflow-y: auto;
}

pre.code code {
  font-family: inherit;
  white-space: pre;
}

/* ---------- hero live compiler ---------- */
.compiler {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-card.live {
  box-shadow: 0 18px 60px -30px rgba(255, 92, 53, .35);
}

.tok-chip {
  margin-left: auto;
  font: 600 12px var(--mono);
  color: var(--muted);
  background: var(--bg-3);
  padding: 4px 11px;
  border-radius: 999px;
}

.tok-chip b {
  color: var(--coral);
}

.save-chip {
  font: 800 13px var(--sans);
  color: #fff;
  background: var(--coral);
  padding: 4px 11px;
  border-radius: 999px;
  margin-left: 8px;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2, 1.4, .4, 1);
}

#hero-js-card.show .save-chip {
  opacity: 1;
  transform: none;
}

.compile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--faint);
  font: 600 11px var(--sans);
  text-transform: uppercase;
  letter-spacing: .1em;
  transition: color .35s;
}

.compile-link.lit {
  color: var(--coral);
}

.compile-link .cl-arrow {
  font-size: 16px;
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
    opacity: .6;
  }

  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

.code-card.dim {
  opacity: .32;
  transition: opacity .6s ease;
}

.code-card.dim.show {
  opacity: 1;
}

/* the JavaScript card shows in full, so the size jump (small KernScript ->
   big JS) reads as a real "growth" effect. */
.code-card.live {
  position: relative;
}

/* a thin sheen on the top edge, like light catching the card */
.code-card.live::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 150, 110, .55), transparent);
}

.typing::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.02em;
  background: var(--coral);
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* reserve the full final height up front so the card does not grow while the
   code types itself in (6 lines at the code line-height). */
#hero-ks {
  display: block;
  min-height: 9.9em;
}

/* ---------- idea grid ---------- */
.idea-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}

.idea-block {
  background: var(--bg);
  padding: 30px clamp(20px, 3vw, 34px);
}

.idea-block h3 {
  font-size: 19px;
  color: var(--coral);
  margin-bottom: 10px;
  font-weight: 600;
}

.idea-block p {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0;
}

/* ---------- metrics + bars ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px 0 50px;
}

.metric {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.metric-num {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  color: var(--coral);
  letter-spacing: -0.03em;
}

.metric-label {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 8px;
}

.bars-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 20px;
}

.bars {
  display: grid;
  gap: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}

.bar-name {
  font: 500 13px var(--mono);
  color: var(--muted);
}

.bar-tracks {
  display: grid;
  gap: 6px;
}

.bar {
  height: 22px;
  border-radius: 6px;
  position: relative;
  background: var(--bg-3);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  align-items: center;
}

.bar-fill.ks {
  background: linear-gradient(90deg, #ff5c35, #ff8a5c);
}

.bar-fill.hand {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
}

.bar-val {
  font: 600 11px var(--mono);
  padding: 0 8px;
  white-space: nowrap;
  color: #fff;
}

.bar-fill.hand .bar-val {
  color: var(--muted);
}

.note {
  color: var(--faint);
  font-size: 14px;
  margin-top: 26px;
  font-style: italic;
}

/* ---------- tabs + examples ---------- */
.tabs {
  display: flex;
  gap: 8px;
  margin: 34px 0 22px;
  flex-wrap: wrap;
}

.tab {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font: 600 14px var(--sans);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}

.tab.active {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

.tab:hover:not(.active) {
  color: var(--text);
  border-color: var(--border-2);
}

.example-pane {
  display: none;
}

.example-pane.active {
  display: block;
  animation: fade .35s ease;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.feature {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, transform .2s;
}

.feature:hover {
  border-color: var(--coral);
  transform: translateY(-3px);
}

.feature .fi {
  font: 700 22px var(--mono);
  color: var(--coral);
  margin-bottom: 14px;
}

.feature h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.feature p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ---------- pipeline ---------- */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin: 44px 0 28px;
  justify-content: center;
}

.stage {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  text-align: center;
  min-width: 130px;
}

.stage.out {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.stage-name {
  font: 700 16px var(--mono);
  color: var(--text);
}

.stage.out .stage-name {
  color: var(--coral);
}

.stage-desc {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.pipe-arrow {
  display: flex;
  align-items: center;
  color: var(--coral);
  font-size: 22px;
}

/* ---------- cta + footer ---------- */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  margin: 0 auto 28px;
  max-width: 24ch;
}

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 50px clamp(16px, 4vw, 40px) 70px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.foot-brand img {
  border-radius: 7px;
}

.site-footer p {
  max-width: 60ch;
  font-size: 15px;
  margin: 0 0 8px;
}

.easter {
  color: var(--coral);
  font-size: 13px;
}

.muted {
  color: var(--faint);
}

/* ---------- what: 3 steps ---------- */
.steps {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.step {
  flex: 1 1 220px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.step-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--coral-soft);
  color: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.step-arrow {
  display: flex;
  align-items: center;
  color: var(--coral);
  font-size: 24px;
}

@media (max-width: 760px) {
  .step-arrow {
    transform: rotate(90deg);
    justify-content: center;
    width: 100%;
  }
}

/* ---------- live demo ---------- */
.demo {
  margin-top: 36px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 30px);
}

.demo-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.demo-tab {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--muted);
  font: 600 14px var(--sans);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}

.demo-tab.active {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

.demo-tab:hover:not(.active) {
  color: var(--text);
}

.demo-stage {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 26px;
  align-items: center;
}

.demo-meters {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.meter-val {
  font: 800 26px var(--mono);
  color: var(--text);
}

.meter-track {
  height: 30px;
  background: var(--bg-3);
  border-radius: 8px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0;
  border-radius: 8px;
  transition: width 1s cubic-bezier(.2, .8, .2, 1);
}

.meter-fill.ks {
  background: linear-gradient(90deg, #ff5c35, #ff8a5c);
}

.meter-fill.js {
  background: linear-gradient(90deg, #3a3550, #6d4af2);
}

.demo-result {
  text-align: center;
  padding-top: 6px;
}

.demo-pct {
  font: 800 clamp(40px, 8vw, 64px) var(--sans);
  color: var(--coral);
  letter-spacing: -0.03em;
  line-height: 1;
}

.demo-pct-label {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.demo-codes {
  min-width: 0;
}

.demo-code {
  display: none;
  background: #0f0d15;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.demo-code.active {
  display: block;
  animation: fade .35s ease;
}

.demo-foot {
  color: var(--faint);
  font-size: 13px;
  margin: 22px 0 0;
}

@media (max-width: 820px) {
  .demo-stage {
    grid-template-columns: 1fr;
  }
}

/* ---------- playground (live in-browser compiler) ---------- */
.pg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 30px;
}

.pg-pane {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pg-input {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 0;
  outline: none;
  background: #0f0d15;
  color: var(--cream);
  padding: 18px 20px;
  font: 500 13.5px/1.65 var(--mono);
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}

.pg-input:focus {
  box-shadow: inset 0 0 0 2px var(--coral-soft);
}

.pg-out {
  min-height: 260px;
  margin: 0;
}

.pg-status {
  margin-top: 16px;
  font: 600 13px var(--mono);
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--green);
}

.pg-status::before {
  content: "✓ ";
}

.pg-status.err {
  color: var(--coral);
  border-color: rgba(255, 92, 53, .4);
  background: rgba(255, 92, 53, .06);
}

.pg-status.err::before {
  content: "✗ ";
}

@media (max-width: 900px) {
  .pg {
    grid-template-columns: 1fr;
  }
}

/* ---------- problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.problem-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}

.problem-card .pc-num {
  font: 800 14px var(--mono);
  color: var(--coral);
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.problem-card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* ---------- example savings strip ---------- */
.ex-savings {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 13px var(--sans);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
}

.pill b {
  font: 700 14px var(--mono);
}

.pill.ks-pill {
  background: var(--coral-soft);
  color: var(--coral);
  border-color: transparent;
}

.pill.js-pill {
  color: var(--blue);
}

.pill.ts-pill {
  color: var(--green);
}

.ex-arrow {
  color: var(--faint);
  font-size: 13px;
}

.ex-pct {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  font: 700 14px var(--sans);
  padding: 7px 16px;
  border-radius: 999px;
}

/* ---------- tutorials ---------- */
.lessons {
  display: grid;
  gap: 18px;
  margin-top: 44px;
}

.lesson {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px clamp(20px, 3vw, 32px);
}

.lesson-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 20px var(--sans);
}

.lesson-body {
  min-width: 0;
}

.lesson-body h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.lesson-body>p {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 16px;
  max-width: 70ch;
}

.lesson .code {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0f0d15;
  margin-top: 10px;
}

pre.code.sh {
  color: #b8e0c4;
}

pre.code.sh::selection {
  background: var(--coral);
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .idea-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .problem-grid {
    grid-template-columns: 1fr;
  }

  .pair {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }
}