/* Experience layer: a more editorial, dimensional builder without changing renderer behavior. */
:root {
  --canvas: #0c100e;
  --canvas-2: #101612;
  --panel: #151b17;
  --panel-2: #19221c;
  --panel-3: #1e2821;
  --ink: #f3f5ef;
  --ink-soft: #c4ccc2;
  --line-soft: rgba(222, 235, 223, .11);
  --line-med: rgba(222, 235, 223, .18);
  --product: #6fcd83;
  --product-soft: rgba(111, 205, 131, .12);
  --identity: #72aee8;
  --identity-soft: rgba(114, 174, 232, .12);
  --instructions: #b59be8;
  --instructions-soft: rgba(181, 155, 232, .12);
  --output: #e3b45f;
  --output-soft: rgba(227, 180, 95, .12);
  --coral: #e88970;
  --experience-shadow: 0 26px 80px rgba(0,0,0,.28);
  --experience-radius: 26px;
  --experience-radius-lg: 34px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

body {
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--canvas);
  background-size: 34px 34px;
}

.shell { width: min(1210px, calc(100% - 34px)); }

.site-header {
  width: min(1220px, calc(100% - 24px));
  margin: 10px auto 0;
  top: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 19px;
  background: color-mix(in srgb, var(--canvas-2) 88%, transparent);
  box-shadow: 0 12px 38px rgba(0,0,0,.12);
}
.header-inner { min-height: 62px; padding-inline: 14px; }
.brand { gap: 12px; }
.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 7px;
}
.brand-mark i {
  display: block;
  height: 3px;
  border-radius: 999px;
  transform-origin: left center;
}
.brand-mark i:nth-child(1) { width: 70%; background: var(--product); }
.brand-mark i:nth-child(2) { width: 100%; background: var(--identity); }
.brand-mark i:nth-child(3) { width: 82%; background: var(--instructions); }
.brand-copy strong { font-size: 14px; letter-spacing: -.015em; }
.brand-copy small { color: color-mix(in srgb, var(--ink-soft) 75%, transparent); }
nav a { color: color-mix(in srgb, var(--ink-soft) 72%, transparent); }
nav a:hover { color: var(--ink); }
.nav-github {
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
}

main.shell { position: relative; }

.hero {
  max-width: none;
  min-height: 680px;
  padding: 82px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(370px, .94fr);
  gap: 62px;
  align-items: center;
  animation: none;
}
.hero::after { display: none; }
.hero-copy-block { max-width: 720px; }
.eyebrow {
  margin-bottom: 16px;
  color: var(--product);
  font-size: 10px;
  letter-spacing: .16em;
}
.eyebrow-dot {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  box-shadow: none;
  background: currentColor;
}
h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(50px, 6.8vw, 84px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 745;
}
.hero h1 em {
  color: var(--product);
  font-style: normal;
}
.lede {
  max-width: 700px;
  margin-bottom: 27px;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.62;
}
.trust-row { gap: 8px; }
.trust-row span {
  padding: 7px 10px;
  border-color: var(--line-soft);
  background: rgba(255,255,255,.03);
  color: color-mix(in srgb, var(--ink-soft) 78%, transparent);
}
.trust-row span:nth-child(1) i { background: var(--product); }
.trust-row span:nth-child(2) i { background: var(--identity); }
.trust-row span:nth-child(3) i { background: var(--instructions); }
.hero-flow {
  max-width: 700px;
  margin-top: 34px;
  color: color-mix(in srgb, var(--ink-soft) 74%, transparent);
}
.hero-flow > div {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.hero-flow > div:not(:last-child)::after { width: 24px; margin: 0 7px; background: var(--line-med); }
.hero-flow b { color: var(--ink); }

.hero-stage {
  min-height: 540px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1200px;
}
.profile-sheet {
  position: absolute;
  width: min(390px, 92%);
  border: 1px solid var(--line-med);
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--experience-shadow);
}
.profile-sheet.back-product {
  height: 390px;
  transform: translate(-54px, 20px) rotate(-6deg);
  background: color-mix(in srgb, var(--panel) 82%, var(--product) 18%);
  border-color: color-mix(in srgb, var(--product) 30%, var(--line-med));
}
.profile-sheet.back-identity {
  height: 408px;
  transform: translate(50px, 14px) rotate(5deg);
  background: color-mix(in srgb, var(--panel) 84%, var(--identity) 16%);
  border-color: color-mix(in srgb, var(--identity) 30%, var(--line-med));
}
.profile-sheet.front {
  z-index: 3;
  min-height: 430px;
  padding: 15px;
  background: color-mix(in srgb, var(--panel) 94%, var(--canvas));
}
.sheet-topline {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 5px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.sheet-file { color: var(--ink); font: 700 12px var(--mono); }
.sheet-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--product);
  background: var(--product-soft);
  font: 750 9px var(--mono);
  letter-spacing: .08em;
}
.sheet-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sheet-blocks { display: grid; gap: 9px; padding-top: 12px; }
.sheet-block {
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 12px;
  align-items: start;
}
.sheet-block > b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font: 800 10px var(--mono);
}
.sheet-block strong { display: block; margin-bottom: 3px; font-size: 13px; }
.sheet-block small { display: block; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.sheet-block.product { background: var(--product-soft); }
.sheet-block.product > b { color: var(--product); background: color-mix(in srgb, var(--product-soft) 70%, black); }
.sheet-block.identity { background: var(--identity-soft); }
.sheet-block.identity > b { color: var(--identity); background: color-mix(in srgb, var(--identity-soft) 70%, black); }
.sheet-block.instructions { background: var(--instructions-soft); }
.sheet-block.instructions > b { color: var(--instructions); background: color-mix(in srgb, var(--instructions-soft) 70%, black); }
.sheet-footer {
  margin-top: 11px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
  color: var(--ink-soft);
  font-size: 10px;
}
.sheet-footer strong { color: var(--output); font: 750 10px var(--mono); }
.stage-chip {
  position: absolute;
  z-index: 6;
  padding: 8px 11px;
  border: 1px solid var(--line-med);
  border-radius: 999px;
  background: var(--panel-2);
  box-shadow: 0 16px 38px rgba(0,0,0,.16);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 760;
}
.stage-chip.local { left: 0; top: 105px; }
.stage-chip.eval { right: -4px; bottom: 114px; }
.stage-chip.local::before, .stage-chip.eval::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--product); }
.stage-chip.eval::before { background: var(--output); }

.control-deck {
  z-index: 35;
  grid-template-columns: minmax(300px, 1.12fr) minmax(270px, .9fr) auto;
  gap: 9px;
  margin: 4px 0 16px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  background: color-mix(in srgb, var(--panel) 98%, black);
  box-shadow: 0 18px 54px rgba(0,0,0,.16);
  animation: none;
}
.control-card {
  position: relative;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: rgba(255,255,255,.025);
}
.control-card::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 10px;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--product);
}
.control-card:nth-child(2)::before { background: var(--output); }
.control-label { margin: 8px 0 6px 2px; }
.deck-actions { padding: 10px 4px 10px 6px; }

.select-trigger {
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 86%, transparent);
}
.select-trigger:hover { border-color: var(--line-med); background: var(--panel-2); }
.select-menu {
  border-color: var(--line-med);
  border-radius: 18px;
  background: var(--panel-3);
  box-shadow: 0 28px 78px rgba(0,0,0,.34);
}
.select-option { border: 1px solid transparent; border-radius: 12px; }
.select-option:hover, .select-option.active { border-color: var(--line-soft); background: var(--identity-soft); }
.select-option[aria-selected="true"] { border-color: color-mix(in srgb, var(--product) 25%, transparent); background: var(--product-soft); }

.button, .copy-button, .text-button {
  border-radius: 13px;
  border-color: var(--line-soft);
  background: color-mix(in srgb, var(--panel-2) 90%, transparent);
}
.button { min-height: 46px; padding: 8px 15px; }
.button.primary {
  border-color: color-mix(in srgb, var(--product) 60%, transparent);
  background: var(--product);
  color: #0a130d;
}
.button.primary:hover { background: color-mix(in srgb, var(--product) 88%, white); }
.button.secondary { color: var(--ink-soft); }
.text-button { color: var(--identity); }

.status {
  min-height: 35px;
  margin: 2px 0 20px;
  padding: 6px 11px;
  border-color: var(--line-soft);
  background: rgba(255,255,255,.025);
}

.workspace {
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  gap: 22px;
  animation: none;
}
.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--experience-radius-lg);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 22px 70px rgba(0,0,0,.15);
}
.panel-heading {
  min-height: 108px;
  padding: 25px 25px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}
.panel-heading h2 {
  margin-bottom: 5px;
  font-size: 24px;
  letter-spacing: -.035em;
}
.panel-caption { color: color-mix(in srgb, var(--ink-soft) 70%, transparent); }
.panel-kicker { color: var(--product); }
.preview-panel .panel-kicker { color: var(--output); }

.editor-panel form { gap: 18px; padding: 18px; }
.root-section {
  position: relative;
  gap: 13px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 23px;
  overflow: visible;
  background: rgba(255,255,255,.022);
}
.root-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 23px 0 0 23px;
  background: var(--product);
}
.root-section.section-product { border-left: 1px solid var(--line-soft); background: color-mix(in srgb, var(--product-soft) 58%, transparent); }
.root-section.section-identity { border-left: 1px solid var(--line-soft); background: color-mix(in srgb, var(--identity-soft) 58%, transparent); }
.root-section.section-instructions { border-left: 1px solid var(--line-soft); background: color-mix(in srgb, var(--instructions-soft) 58%, transparent); }
.root-section.section-product::before { background: var(--product); }
.root-section.section-identity::before { background: var(--identity); }
.root-section.section-instructions::before { background: var(--instructions); }
.root-section > legend {
  padding: 0 9px;
  font-size: 15px;
  letter-spacing: -.015em;
}
.section-product > legend { color: var(--product); }
.section-identity > legend { color: var(--identity); }
.section-instructions > legend { color: var(--instructions); }
.nested-section {
  padding: 15px;
  border-color: var(--line-soft);
  border-radius: 17px;
  background: color-mix(in srgb, var(--panel-2) 74%, transparent);
}
.nested-section > legend { color: var(--ink-soft); }
.section-note, .field-help { color: color-mix(in srgb, var(--ink-soft) 68%, transparent); }
.field > label { font-size: 12px; }
input, textarea {
  border-color: var(--line-soft);
  border-radius: 13px;
  background: color-mix(in srgb, var(--canvas-2) 76%, transparent);
}
input:hover, textarea:hover { border-color: var(--line-med); }
input:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--identity) 72%, transparent);
  box-shadow: 0 0 0 3px var(--identity-soft);
  background: var(--canvas-2);
}
.field .select-trigger { border-color: var(--line-soft); }

.validation-summary {
  margin: 18px 18px 0;
  border-radius: 15px;
  border-color: var(--line-soft);
}
.json-details { border-color: var(--line-soft); }

.preview-panel {
  position: sticky;
  top: 88px;
  background: color-mix(in srgb, var(--panel) 90%, var(--output-soft));
}
.output-stack { gap: 11px; padding: 14px; }
.output-card {
  position: relative;
  border-color: var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}
.output-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--product);
  opacity: .85;
}
.output-card:nth-child(2)::before { background: var(--identity); }
.output-card:nth-child(3)::before { background: var(--instructions); }
.output-card:nth-child(4)::before { background: var(--output); }
.output-heading { min-height: 49px; border-color: var(--line-soft); }
.output-index {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--product-soft);
  color: var(--product);
}
.output-card:nth-child(2) .output-index { background: var(--identity-soft); color: var(--identity); }
.output-card:nth-child(3) .output-index { background: var(--instructions-soft); color: var(--instructions); }
.output-card:nth-child(4) .output-index { background: var(--output-soft); color: var(--output); }
.copy-button { border-radius: 999px; }
pre { color: color-mix(in srgb, var(--ink) 86%, var(--ink-soft)); }

.explanation {
  max-width: none;
  margin: 88px 0 42px;
  padding: 40px 42px;
  border: 1px solid var(--line-soft);
  border-radius: var(--experience-radius-lg);
  display: grid;
  grid-template-columns: .28fr 1fr 1fr;
  gap: 30px;
  align-items: start;
  background: color-mix(in srgb, var(--panel) 88%, var(--instructions-soft));
}
.explanation-rule { width: 64px; margin-top: 3px; background: var(--instructions); }
.explanation h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.02; letter-spacing: -.045em; }
.explanation p { color: var(--ink-soft); }

footer { margin-top: 34px; border-top-color: var(--line-soft); }

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #f4f0e7;
    --canvas-2: #eee8dc;
    --panel: #fffdf8;
    --panel-2: #f7f3ea;
    --panel-3: #ffffff;
    --ink: #20241f;
    --ink-soft: #666e64;
    --line-soft: rgba(32,36,31,.11);
    --line-med: rgba(32,36,31,.18);
    --product: #477c55;
    --product-soft: rgba(71,124,85,.11);
    --identity: #4f75a0;
    --identity-soft: rgba(79,117,160,.11);
    --instructions: #765f88;
    --instructions-soft: rgba(118,95,136,.11);
    --output: #92712f;
    --output-soft: rgba(146,113,47,.11);
    --experience-shadow: 0 24px 70px rgba(64,53,38,.12);
  }
  body {
    background:
      linear-gradient(rgba(32,36,31,.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(32,36,31,.025) 1px, transparent 1px),
      var(--canvas);
    background-size: 34px 34px;
  }
  .site-header { background: rgba(244,240,231,.90); }
  .profile-sheet.front { background: rgba(255,253,248,.96); }
  .control-deck { background: rgba(255,253,248,.82); }
  .panel { background: rgba(255,253,248,.93); }
  input, textarea { background: rgba(255,255,255,.68); }
  input:focus, textarea:focus { background: #fff; }
  .sheet-block.product > b,
  .sheet-block.identity > b,
  .sheet-block.instructions > b { background: rgba(255,255,255,.62); }
}

/* Rendered-output guidance. */
.output-target {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.025);
  font: 700 9px/1.2 var(--mono);
  white-space: nowrap;
}

.preview-use-note {
  margin: 0 12px 2px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--output) 28%, var(--line-soft));
  border-radius: 14px;
  background: var(--output-soft);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}
.preview-use-note strong { color: var(--ink); }
