:root {
  --bg: #f5f3ec;
  --surface: #fffdf8;
  --surface-2: #eef1e7;
  --ink: #17231c;
  --muted: #657168;
  --line: #d9ded5;
  --green: #1f5b45;
  --green-2: #2f765d;
  --green-3: #dce9df;
  --lime: #b7d14b;
  --amber: #dca94b;
  --danger: #9e423d;
  --shadow: 0 18px 55px rgba(27, 52, 40, .10);
  --radius: 26px;
  --radius-sm: 16px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(183,209,75,.18), transparent 26rem),
    radial-gradient(circle at 92% 12%, rgba(47,118,93,.12), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

a { color: inherit; }
button, input, select { font: inherit; }
.shell { width: min(var(--max), calc(100vw - 32px)); margin: 0 auto; padding: 20px 0 44px; }

.topnav {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(31,91,69,.12);
  border-radius: 22px;
  background: rgba(255,253,248,.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(32, 60, 45, .08);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-size: 12px; letter-spacing: .06em;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.08);
}
.navlinks { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.navlinks a { text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 650; padding: 9px 12px; border-radius: 999px; }
.navlinks a:hover, .navlinks a.active { color: var(--green); background: var(--green-3); }

.hero {
  margin-top: 18px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 34px;
  min-height: 560px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(31,91,69,.14);
  border-radius: 34px;
  background: linear-gradient(145deg, #fffdf8 0%, #f8f5eb 66%, #edf2e7 100%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  width: 440px; height: 440px;
  right: -120px; top: -145px;
  border: 1px solid rgba(31,91,69,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(31,91,69,.035), 0 0 0 88px rgba(183,209,75,.055);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; align-self: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(183,209,75,.18); }
h1, h2, h3 { margin: 0; letter-spacing: -.045em; line-height: 1.02; }
h1 { margin-top: 18px; max-width: 11ch; font-size: clamp(48px, 7vw, 88px); font-weight: 760; }
h2 { font-size: clamp(34px, 4vw, 56px); font-weight: 740; }
h3 { font-size: 22px; font-weight: 720; }
.lead { margin: 20px 0 0; max-width: 780px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer; text-decoration: none;
  background: var(--green); color: #fff; font-weight: 720; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); background: var(--green-2); box-shadow: 0 10px 22px rgba(31,91,69,.16); }
.button.secondary { background: transparent; color: var(--green); border: 1px solid rgba(31,91,69,.24); }
.button.ghost { background: var(--surface-2); color: var(--green); }
.button.small { padding: 9px 13px; font-size: 13px; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }

.hero-aside { position: relative; z-index: 2; align-self: end; display: grid; gap: 12px; }
.metric-card { padding: 18px; border: 1px solid rgba(31,91,69,.13); border-radius: 22px; background: rgba(255,255,255,.72); }
.metric-card strong { display: block; color: var(--green); font-size: 26px; letter-spacing: -.04em; }
.metric-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.section, .panel { margin-top: 18px; padding: clamp(24px, 4vw, 42px); border-radius: 30px; border: 1px solid rgba(31,91,69,.12); background: var(--surface); box-shadow: 0 12px 36px rgba(29,55,42,.06); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-head p { max-width: 630px; margin: 0; color: var(--muted); line-height: 1.6; }
.kicker { color: var(--green); text-transform: uppercase; letter-spacing: .11em; font-size: 12px; font-weight: 800; margin-bottom: 10px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.card { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: #fffefa; }
.card.emphasis { background: var(--green); color: #fff; border-color: var(--green); }
.card h3 + p { margin-top: 10px; }
.card p, .muted { color: var(--muted); line-height: 1.6; }
.card.emphasis p, .card.emphasis .muted { color: rgba(255,255,255,.75); }
.badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: var(--green-3); color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.card.emphasis .badge { background: rgba(255,255,255,.14); color: #fff; }
.card-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--green-3); color: var(--green); font-weight: 800; margin-bottom: 16px; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.flow-step { position: relative; padding: 18px; min-height: 150px; border-radius: 20px; background: var(--surface-2); border: 1px solid rgba(31,91,69,.10); }
.flow-step:not(:last-child)::after { content: "→"; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); color: var(--green-2); font-size: 22px; font-weight: 900; z-index: 2; }
.flow-step strong { display: block; margin-bottom: 8px; }
.flow-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.timeline { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px; border-radius: 20px; background: #fbfaf5; border: 1px solid var(--line); }
.timeline-item .n { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--green); color: white; font-weight: 800; }
.timeline-item p { margin: 6px 0 0; color: var(--muted); line-height: 1.55; }

.tool-list { display: grid; gap: 10px; }
.tool { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: #fbfaf5; }
.tool .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 5px var(--green-3); }
.tool small { color: var(--muted); }
.tool code, code.inline { background: #edf0e9; color: var(--green); border-radius: 8px; padding: 3px 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.prompt {
  position: relative; margin-top: 14px; padding: 18px 18px 58px; white-space: pre-wrap; word-break: break-word;
  border-radius: 20px; background: #15271e; color: #eaf2ec; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.copy-btn { position: absolute; right: 12px; bottom: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; padding: 8px 10px; border-radius: 10px; cursor: pointer; font: 700 12px/1 Inter, sans-serif; }
.copy-btn:hover { background: rgba(255,255,255,.16); }

.notice { margin-top: 14px; padding: 15px 16px; border-radius: 17px; border: 1px solid #d7ddcf; background: #f2f4ed; color: #4f5c53; line-height: 1.55; font-size: 14px; }
.notice.success { border-color: #bdd8c7; background: #eaf4ed; color: #28543d; }
.notice.warn { border-color: #e6d4ad; background: #fbf3df; color: #725a25; }
.notice.danger { border-color: #e5c0bc; background: #fbebe9; color: #783b36; }

.architecture { overflow-x: auto; padding-bottom: 6px; }
.arch-grid { min-width: 900px; display: grid; grid-template-columns: 1fr 68px 1.2fr 68px 1fr; gap: 8px; align-items: stretch; }
.arch-box { padding: 20px; border-radius: 22px; border: 1px solid var(--line); background: #fbfaf5; }
.arch-box strong { display: block; color: var(--green); margin-bottom: 6px; }
.arch-arrow { display: grid; place-items: center; color: var(--green); font-size: 26px; }

.demo-box { display: grid; gap: 12px; padding: 20px; border-radius: 24px; background: #eef1e7; border: 1px solid rgba(31,91,69,.12); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input, .select { min-width: 0; flex: 1 1 240px; border: 1px solid #cbd3c9; border-radius: 14px; background: #fff; padding: 12px 14px; color: var(--ink); outline: none; }
.input:focus, .select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(47,118,93,.10); }
.demo-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.product { position: relative; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.product label { display: flex; gap: 9px; align-items: start; cursor: pointer; }
.product strong { display: block; font-size: 15px; }
.product small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.product .price { margin-top: 10px; color: var(--green); font-weight: 800; }
.demo-status { min-height: 22px; color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cart-total { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-size: 20px; }
.cart-total strong { font-size: 30px; color: var(--green); }

.checklist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 9px; }
.checklist li { position: relative; padding-left: 28px; color: var(--muted); line-height: 1.5; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--green-3); color: var(--green); font-size: 12px; font-weight: 900; }

.footer { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 22px 8px 0; color: var(--muted); font-size: 12px; }
.footer a { color: var(--green); text-decoration: none; }

@media (max-width: 980px) {
  .topnav { position: static; align-items: flex-start; flex-direction: column; }
  .navlinks { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-aside { grid-template-columns: repeat(3,1fr); }
  .grid-3, .demo-results { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow-step::after { display: none; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 18px, var(--max)); padding-top: 9px; }
  .navlinks a { padding: 8px 10px; }
  .hero, .section, .panel { border-radius: 22px; }
  .hero { padding: 26px 22px; }
  h1 { font-size: 48px; }
  .hero-aside, .grid-2, .grid-3, .demo-results, .flow { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .tool { grid-template-columns: auto 1fr; }
  .tool code { grid-column: 2; justify-self: start; }
}

/* Workshop content additions */
.compact-hero { min-height: 500px; }
.compact-hero h1 { max-width: 15ch; font-size: clamp(42px, 5.6vw, 72px); }
.flow-5 { grid-template-columns: repeat(5, 1fr); }

.concept-flow {
  display: grid;
  grid-template-columns: 1.15fr 42px 1.15fr 42px 1.15fr 42px 1.15fr 42px 1.15fr;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
}
.concept-node {
  min-width: 160px;
  min-height: 145px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbfaf5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.concept-node > span { font-size: 26px; margin-bottom: 12px; }
.concept-node b { color: var(--green); }
.concept-node small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
.concept-arrow { display: grid; place-items: center; color: var(--green-2); font-size: 24px; font-weight: 800; }

.plain-list { margin: 14px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.55; }
.plain-list li + li { margin-top: 9px; }
.prompt-light {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: #f5f5ef;
  color: #435048;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.theory-arch { min-width: 760px; }

@media (max-width: 1100px) {
  .flow-5 { grid-template-columns: repeat(3, 1fr); }
  .flow-5 .flow-step::after { display: none; }
}

@media (max-width: 700px) {
  .compact-hero h1 { font-size: 42px; }
  .flow-5 { grid-template-columns: 1fr; }
  .concept-flow { grid-template-columns: 1fr; overflow: visible; }
  .concept-node { min-width: 0; min-height: 0; }
  .concept-arrow { transform: rotate(90deg); min-height: 28px; }
}
.concept-flow {
  grid-template-columns:
    minmax(170px, 1fr) 42px
    minmax(170px, 1fr) 42px
    minmax(170px, 1fr) 42px
    minmax(170px, 1fr) 42px
    minmax(170px, 1fr);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.concept-node {
  min-width: 0;
}

@media (max-width: 700px) {
  .concept-flow {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .concept-node {
    min-width: 0;
    min-height: 0;
  }
}
