.home-hero {
  border-bottom: 1px solid var(--rule-subtle);
  background: radial-gradient(
    ellipse at 82% 24%,
    rgb(32 62 55 / 0.42) 0,
    transparent 56%
  );
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 3.6vw, 3.25rem);
  padding-block: clamp(2.75rem, 5.2vw, 4.75rem);
}
.section-eyebrow,
.install,
.reading-list small {
  font-family: var(--mono);
}
.product-type {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent);
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.product-type strong {
  color: var(--ink);
  font-weight: 650;
}
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  margin: 0 0 1.15rem;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--accent);
}
.section-eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: currentColor;
}
.hero-intro h1,
main h2 {
  margin: 0;
  font-weight: 600;
}
.hero-intro h1 {
  max-width: none;
  font-size: clamp(2.35rem, 3.45vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.042em;
}
.hero-intro h1 span {
  display: block;
  color: #b7d2ca;
}
.hero-lede {
  max-width: 48ch;
  text-wrap: balance;
  color: var(--ink-secondary);
  font-size: clamp(1rem, 1.18vw, 1.1rem);
  line-height: 1.58;
  margin: 1.35rem 0 0;
}
.hero-actions {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.primary-action,
.text-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}
.primary-action {
  min-height: 2.8rem;
  padding: 0.58rem 1.15rem;
  color: #09231c;
  background: var(--accent);
  text-decoration: none;
  border-radius: 0.4rem;
}
.primary-action:hover {
  background: var(--accent-hover);
}
.text-action {
  color: var(--ink);
  text-decoration-color: var(--control-border);
  text-underline-offset: 0.3em;
}
.text-action:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
main h2 {
  font-size: clamp(1.85rem, 3.1vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-wrap: balance;
}

/* Hero starter card */
.feature-preview {
  display: grid;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: #12171b;
  overflow: hidden;
  box-shadow:
    0 2rem 4.25rem rgb(0 0 0 / 0.5),
    inset 0 1px 0 rgb(255 255 255 / 0.05);
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.72rem 1.15rem;
  background: #161c21;
  border-bottom: 1px solid var(--rule-subtle);
}
.feature-preview h2 {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.template-switch {
  display: inline-flex;
  padding: 0.18rem;
  border: 1px solid var(--rule);
  border-radius: 0.4rem;
  background: #0e1215;
  gap: 0.12rem;
}
.template-switch button {
  padding: 0.24rem 0.62rem;
  border: 0;
  border-radius: 0.26rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  transition:
    background-color 140ms ease,
    color 140ms ease;
}
.template-switch button:hover {
  color: var(--ink);
}
.template-switch button[aria-selected="true"] {
  background: var(--accent-surface);
  color: var(--accent);
}
.install {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid var(--rule-subtle);
  background: #0b0e11;
}
.prompt-sign {
  color: var(--accent);
  user-select: none;
  font-size: 0.84rem;
}
.install code {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--ink);
}
.install button {
  flex: none;
  min-height: 1.85rem;
  padding: 0.2rem 0.62rem;
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  background: #151b1f;
  color: var(--ink-secondary);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}
.install button:hover {
  background: var(--surface-elevated);
  border-color: var(--accent-muted);
  color: var(--accent);
}
.file-tree {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0.65rem;
  display: grid;
  gap: 0.06rem;
  background: #11161a;
}
.ft-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.26rem 0.55rem;
  border-radius: 0.34rem;
  transition: background-color 120ms ease;
}
.ft-row:hover {
  background: rgb(142 227 197 / 0.045);
}
.ft-row[data-depth="1"] {
  padding-left: 1.65rem;
}
.ft-row[data-depth="2"] {
  padding-left: 2.85rem;
}
.ft-row[data-depth="1"]::before,
.ft-row[data-depth="2"]::before {
  content: "";
  position: absolute;
  left: 0.92rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgb(255 255 255 / 0.08);
}
.ft-row[data-depth="2"]::after {
  content: "";
  position: absolute;
  left: 2.12rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgb(255 255 255 / 0.08);
}
.ft-node {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}
.ft-icon {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  color: #6d8088;
}
.ft-row[data-kind="dir"] .ft-icon {
  color: #6ec4a7;
}
.ft-row[data-kind="ts"] .ft-icon {
  color: #79b8ff;
}
.ft-row[data-kind="json"] .ft-icon {
  color: #e6b87d;
}
.ft-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
}
.ft-row[data-kind="dir"] .ft-name {
  color: #d3e0e3;
}
.ft-note {
  color: #7b8d94;
  font-family: var(--sans);
  font-size: 0.77rem;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-footer {
  display: grid;
  gap: 0.72rem;
  padding: 0.85rem 1.15rem 0.95rem;
  border-top: 1px solid var(--rule-subtle);
  background: #0e1316;
}
.batteries-block {
  display: grid;
  gap: 0.45rem;
}
.batteries-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.69rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #768890;
}
.batteries-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.batteries-list li {
  padding: 0.18rem 0.48rem;
  border: 1px solid rgb(255 255 255 / 0.07);
  border-radius: 0.28rem;
  background: rgb(255 255 255 / 0.03);
  color: #b7c6cb;
  font-family: var(--mono);
  font-size: 0.71rem;
  line-height: 1.3;
}
.preview-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.preview-caption code,
.contrast-list code,
.starter-copy code {
  font-family: var(--mono);
  font-size: 0.84em;
  white-space: nowrap;
  color: var(--ink);
  background: var(--surface);
  padding: 0.12em 0.32em;
  border-radius: 0.25rem;
  border: 1px solid var(--rule-subtle);
}

/* Section 2: Relationship permissions + tabbed code box */
.code-showcase {
  padding-block: clamp(3.5rem, 6.5vw, 5.75rem);
  border-bottom: 1px solid var(--rule-subtle);
  background: var(--paper);
}
.showcase-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: start;
  gap: clamp(2rem, 4.5vw, 4rem);
}
.section-lede {
  max-width: 48ch;
  margin: 1.05rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}
.contrast-list {
  display: grid;
  gap: 1.05rem;
  list-style: none;
  margin: 1.65rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--rule-subtle);
}
.contrast-list li {
  display: grid;
  gap: 0.24rem;
}
.contrast-list strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 620;
}
.contrast-list span {
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.55;
}

/* Crisp editor-style code box */
.code-box {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: #11161a;
  box-shadow:
    0 2rem 4.25rem rgb(0 0 0 / 0.5),
    inset 0 1px 0 rgb(255 255 255 / 0.05);
}
.code-box-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 0.85rem;
  border-bottom: 1px solid var(--rule-subtle);
  background: #161c21;
}
.code-box-tabs {
  display: flex;
  gap: 0.05rem;
}
.code-box-tabs button {
  min-height: 2.7rem;
  padding: 0.45rem 0.58rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition:
    color 140ms ease,
    border-color 140ms ease;
}
.code-box-tabs button:hover,
.code-box-tabs button[aria-selected="true"] {
  color: var(--ink);
}
.code-box-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.code-box-tabs button:focus:not(:focus-visible),
.template-switch button:focus:not(:focus-visible) {
  outline: none;
}
.code-box-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
  border-radius: 0.25rem;
}
.code-box-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-block: 0.4rem;
}
.code-box-file {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}
.code-box-copy {
  padding: 0.22rem 0.58rem;
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    border-color 140ms ease,
    color 140ms ease;
}
.code-box-copy:hover {
  border-color: var(--accent-muted);
  color: var(--accent);
}
.code-box-panel pre {
  margin: 0;
  padding: 1.25rem 1.35rem;
  min-height: 18.5rem;
  overflow-x: auto;
  color: #e5ecef;
  font: 0.83rem/1.68 var(--mono);
  tab-size: 2;
}
.code-box-panel code {
  display: block;
  font: inherit;
}
.tok-kw {
  color: #93c5fd;
}
.tok-fn {
  color: #8ee3c5;
}
.tok-str {
  color: #fde68a;
}
.tok-num {
  color: #fca5a5;
}
.tok-type {
  color: #c4b5fd;
}
.tok-cmt {
  color: #7c8d93;
  font-style: italic;
}
.tok-hi {
  display: inline-block;
  min-width: calc(100% + 2.7rem);
  margin-inline: -1.35rem;
  padding-inline: 1.35rem;
  background: rgb(142 227 197 / 0.11);
  box-shadow: inset 2px 0 0 var(--accent);
  color: #edfbf6;
}

/* Section 3 & 4: Two-column feature sections */
.starter-section {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
  padding-block: clamp(3.5rem, 6.5vw, 5.75rem);
}

/* Boundaries terminal section */
.boundaries-section {
  border-top: 1px solid var(--rule-subtle);
  background: linear-gradient(180deg, #101518 0%, var(--paper) 100%);
}
.terminal-box {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: #0d1115;
  box-shadow:
    0 2rem 4.25rem rgb(0 0 0 / 0.5),
    inset 0 1px 0 rgb(255 255 255 / 0.05);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1.15rem;
  border-bottom: 1px solid var(--rule-subtle);
  background: #161c21;
}
.terminal-prompt-badge {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 650;
}
.terminal-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 500;
}
.terminal-tag {
  margin-left: auto;
  padding: 0.14rem 0.48rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.28rem;
  background: rgb(255 255 255 / 0.03);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.terminal-box pre {
  margin: 0;
  padding: 1.25rem 1.35rem;
  overflow-x: auto;
  color: var(--ink-secondary);
  font: 0.82rem/1.76 var(--mono);
}
.term-prompt {
  color: var(--accent);
}
.term-fail {
  display: inline-block;
  padding: 0 0.35em;
  border-radius: 0.2rem;
  background: rgb(248 113 113 / 0.16);
  color: #fca5a5;
  font-weight: 600;
}
.term-pass {
  display: inline-block;
  padding: 0 0.35em;
  border-radius: 0.2rem;
  background: rgb(142 227 197 / 0.14);
  color: var(--accent);
  font-weight: 600;
}
.term-path {
  color: #fde68a;
}
.term-hint {
  color: #8fa1a7;
}

/* Bottom reading list */
.further {
  border-top: 1px solid var(--rule-subtle);
  background: var(--surface-subtle);
  padding-block: clamp(3rem, 6vw, 4.75rem);
}
.further-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.further-title h2 {
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
}
.reading-list {
  display: grid;
}
.reading-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  padding: 1.05rem 0.5rem;
  margin-inline: -0.5rem;
  border-top: 1px solid var(--rule-subtle);
  border-radius: 0.35rem;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    border-color 140ms ease;
}
.reading-list a:last-child {
  border-bottom: 1px solid var(--rule-subtle);
}
.reading-list span {
  font-size: 1.02rem;
  font-weight: 560;
}
.reading-list small {
  color: var(--muted);
  font-size: 0.77rem;
}
.reading-list i {
  font-style: normal;
  color: var(--muted);
  transition:
    transform 140ms ease,
    color 140ms ease;
}
.reading-list a:hover {
  background: rgb(23 29 33 / 0.65);
}
.reading-list a:hover span {
  color: var(--accent);
}
.reading-list a:hover i {
  color: var(--accent);
  transform: translate(2px, -2px);
}

@media (max-width: 60rem) {
  .hero-layout,
  .showcase-layout,
  .starter-section,
  .further-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .code-box-panel pre {
    min-height: 0;
  }
}
@media (max-width: 36rem) {
  .reading-list a {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .reading-list small {
    grid-column: 1;
  }
  .reading-list i {
    grid-row: 1;
    grid-column: 2;
  }
}
