:root {
  color-scheme: dark;
  --ink: #101014;
  --paper: #f7f7f3;
  --white: #ffffff;
  --muted: #aaaab3;
  --line: rgba(255, 255, 255, 0.14);
  --ruby: #ff3654;
  --ruby-deep: #c80d2e;
  --cloud: #ff8a1f;
  --blue: #7dd6ff;
  --radius: 1.5rem;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
  line-height: 1.6;
}

a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: -5rem;
  padding: 0.7rem 1rem;
  background: var(--white);
  color: var(--ink);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto 0;
  height: 5.5rem;
  padding: 0 4vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand i { color: var(--cloud); font-style: normal; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem 0.55rem 0.55rem 0;
  background: linear-gradient(145deg, var(--ruby), var(--ruby-deep));
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
}

.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  color: #d0d0d6;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--white); }

.language-switch {
  justify-self: end;
  display: flex;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.language-switch button {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
}
.language-switch button[aria-pressed="true"] { background: var(--white); color: var(--ink); }

.hero {
  min-height: 100vh;
  padding: 9.5rem 6vw 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(25rem, 0.95fr);
  grid-template-rows: 1fr auto;
  gap: 3.5rem 6vw;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 45%, rgba(255, 54, 84, 0.13), transparent 25rem),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 4.5rem 4.5rem, 4.5rem 4.5rem;
}

.eyebrow, .section-number {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.eyebrow { display: flex; align-items: center; gap: 0.8rem; }
.eyebrow > span:first-child { width: 1.8rem; height: 0.18rem; background: var(--cloud); }

h1, h2 { text-wrap: balance; }
h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(4rem, 8.2vw, 8.8rem);
  line-height: 0.84;
  letter-spacing: -0.075em;
  font-weight: 850;
}
h1 span, h1 em { display: block; }
h1 em {
  color: transparent;
  background: linear-gradient(100deg, var(--ruby) 15%, var(--cloud) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  font-style: normal;
}
html[lang="ja"] h1 em { font-size: 0.48em; letter-spacing: -0.055em; white-space: nowrap; }

.hero-lede {
  max-width: 38rem;
  margin: 2rem 0 0;
  color: #c3c3ca;
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 0.8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 10rem;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 760;
}
.button-primary { background: var(--white); color: var(--ink); }
.button-primary:hover { background: var(--cloud); }
.button-ghost:hover { border-color: rgba(255,255,255,.5); }

.runtime-card {
  position: relative;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(16,16,20,.82);
  box-shadow: 0 2rem 7rem rgba(0,0,0,.45);
  overflow: hidden;
  backdrop-filter: blur(18px);
}
.runtime-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, var(--ruby), transparent);
}
.runtime-topline, .runtime-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
.live-dot { color: #9ff5bb; }
.live-dot::before, .runtime-status i {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: #57e389;
  box-shadow: 0 0 0.8rem #57e389;
}
.runtime-flow { display: flex; align-items: center; padding: 1.5rem 1.1rem 1.1rem; }
.runtime-node {
  flex: 0 0 28%;
  min-height: 5.7rem;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #18181e;
}
.runtime-node strong { font-size: 0.82rem; }
.runtime-node small { color: var(--muted); font: 0.66rem ui-monospace, monospace; }
.node-index { margin-bottom: auto; color: #6d6d77; font: 0.58rem ui-monospace, monospace; }
.node-wasm { border-color: rgba(125,214,255,.35); }
.node-ruby { border-color: rgba(255,54,84,.45); }
.flow-line { flex: 1; height: 1px; position: relative; background: #44444d; overflow: hidden; }
.flow-line i {
  position: absolute;
  top: -1px;
  width: 30%;
  height: 3px;
  background: var(--cloud);
  animation: signal 2s linear infinite;
}
@keyframes signal { from { left: -35%; } to { left: 110%; } }

.runtime-card pre {
  margin: 0 1.1rem 1.1rem;
  padding: 1.25rem;
  border-radius: 0.8rem;
  background: #09090c;
  color: #f2f2f4;
  overflow-x: auto;
  font: 0.78rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.code-dim { color: #9191a0; }
.code-hot { color: var(--blue); }
.code-num { color: var(--cloud); }
.code-str { color: #ff7990; }
.runtime-status { border-top: 1px solid var(--line); border-bottom: 0; }
.runtime-status span:first-child { color: #bbbcc5; }

.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.hero-stats > div { padding: 1.25rem 0; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border-right: 0; padding-left: 1.25rem; }
.hero-stats > div:not(:first-child) { padding-left: 1.25rem; }
.hero-stats strong { display: block; font: 800 0.95rem ui-monospace, monospace; }
.hero-stats span { color: var(--muted); font-size: 0.76rem; }

.section-pad { padding: 8rem 6vw; scroll-margin-top: 1rem; }
.possibility { background: var(--paper); color: var(--ink); }
.possibility .section-number { color: #66666c; }
.section-heading { display: grid; grid-template-columns: 1fr 0.7fr; gap: 8vw; align-items: end; }
.section-heading h2, .start-copy h2, .rack-intro h2, .bindings-heading h2, .examples-heading h2, .links-lead h2 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}
.section-heading p { margin: 0; color: #57575e; font-size: 1.1rem; line-height: 1.8; }

.possibility-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 7rem;
  border-top: 1px solid #d4d4d0;
}
.possibility-grid article {
  min-height: 18rem;
  padding: 1.5rem 2rem 1.5rem 0;
  border-right: 1px solid #d4d4d0;
}
.possibility-grid article:not(:first-child) { padding-left: 2rem; }
.possibility-grid article:last-child { border-right: 0; }
.card-index { color: var(--ruby-deep); font: 700 0.75rem ui-monospace, monospace; }
.possibility-grid h3 { margin: 5rem 0 0.7rem; font-size: 1.35rem; letter-spacing: -0.03em; }
.possibility-grid p { margin: 0; color: #626268; }
.possibility-grid code, .start-copy code, .rack-intro code, .bindings-heading code, .example-grid code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

.getting-started {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255,54,84,.08), transparent 40%),
    #16161c;
}
.start-layout { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 8vw; align-items: center; }
.start-copy h2 { max-width: 10ch; }
.start-copy > p { max-width: 36rem; margin: 1.6rem 0; color: #b9b9c0; font-size: 1.05rem; }
.requirements { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.requirements span {
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d2d2d8;
  font: 0.7rem ui-monospace, monospace;
}
.start-link { display: inline-block; margin-top: 1.4rem; color: var(--white); border-bottom-color: #71717b; font-size: 0.82rem; }
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem 1rem;
  margin-top: 2.5rem;
  padding: 1.2rem;
  border-left: 3px solid var(--cloud);
  background: rgba(255,255,255,.045);
}
.callout strong { font-size: 0.8rem; }
.callout span { color: var(--muted); font-size: 0.8rem; }
.terminal {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: #09090c;
  box-shadow: 0 2rem 6rem rgba(0,0,0,.28);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}
.terminal-bar span { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #43434c; }
.terminal-bar span:first-child { background: var(--ruby); }
.terminal-bar span:nth-child(2) { background: var(--cloud); }
.terminal-bar b { margin-left: auto; color: #6e6e78; font: 0.65rem ui-monospace, monospace; }
.terminal ol { margin: 0; padding: 0; list-style: none; }
.terminal li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.terminal li > span { color: #5f5f68; font: 0.65rem ui-monospace, monospace; }
.terminal code { color: #e8e8ec; font: 0.8rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.terminal-output { padding: 1rem 1.1rem; color: #85858e; font: 0.72rem ui-monospace, monospace; }
.terminal-output > span { color: #57e389; margin-right: 0.5rem; }
.terminal-output strong { color: #d7d7dc; }

.rack-section { background: #eff0ec; color: var(--ink); }
.rack-section .section-number, .bindings-section .section-number, .links-section .section-number { color: #6d6d73; }
.rack-intro, .bindings-heading, .examples-heading {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr;
  gap: 8vw;
  align-items: end;
}
.rack-intro p, .bindings-heading p, .examples-heading p { color: #5d5d64; font-size: 1.05rem; line-height: 1.8; }
.text-link { color: var(--ink); font-weight: 780; text-decoration: none; border-bottom: 1px solid #888890; }
.rack-workbench {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  margin-top: 5rem;
  border: 1px solid #d3d4d0;
  border-radius: 1.25rem;
  background: var(--white);
  overflow: hidden;
}
.code-tabs {
  grid-column: 1;
  display: flex;
  padding: 0.5rem;
  border-bottom: 1px solid #2d2d34;
  background: #141419;
}
.code-tabs button {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  color: #85858e;
  cursor: pointer;
  font: 700 0.72rem ui-monospace, monospace;
}
.code-tabs button[aria-selected="true"] { color: var(--white); background: #2a2a31; }
.code-panel { grid-column: 1; background: #141419; }
.code-panel pre, .binding-stage pre {
  margin: 0;
  min-height: 25rem;
  padding: 2.5rem;
  color: #f4f4f5;
  overflow-x: auto;
  font: 0.8rem/1.8 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.syntax-purple { color: #c69cff; }
.syntax-blue { color: #8ddaff; }
.syntax-red { color: #ff8297; }
.syntax-orange { color: #ffac62; }
.support-matrix { grid-column: 2; grid-row: 1 / span 2; padding: 1.8rem; border-left: 1px solid #d3d4d0; }
.matrix-head { display: flex; justify-content: space-between; align-items: center; }
.matrix-head span { font-weight: 800; }
.matrix-head b { padding: 0.25rem 0.5rem; border-radius: 999px; background: #dff7e8; color: #126732; font: 0.62rem ui-monospace, monospace; }
.support-matrix dl { margin: 2rem 0 1.5rem; }
.support-matrix dl > div { padding: 0.8rem 0; border-bottom: 1px solid #e3e3df; }
.support-matrix dt { font-size: 0.8rem; font-weight: 700; }
.support-matrix dd { margin: 0.25rem 0 0; font-size: 0.72rem; }
.support-matrix dd::before { content: ""; display: inline-block; width: 0.42rem; height: 0.42rem; margin-right: 0.45rem; border-radius: 50%; }
.support-matrix dd.yes { color: #187b3c; }
.support-matrix dd.yes::before { background: #27ae60; }
.support-matrix dd.no { color: #8d4f21; }
.support-matrix dd.no::before { background: var(--cloud); }
.support-matrix > p { color: #727279; font-size: 0.75rem; line-height: 1.6; }

.bindings-section { background: var(--paper); color: var(--ink); }
.bindings-heading h2, .examples-heading h2 { max-width: 12ch; }
.binding-guide-link { display: inline-block; margin-top: 2rem; }
.binding-explorer {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  margin-top: 5rem;
  border: 1px solid #d5d5d1;
  border-radius: 1.25rem;
  overflow: hidden;
}
.binding-list { background: #e9e9e5; }
.binding-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem;
  border: 0;
  border-bottom: 1px solid #d0d0cc;
  background: transparent;
  color: #696970;
  cursor: pointer;
  text-align: left;
}
.binding-list button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.binding-list span { display: flex; gap: 1rem; align-items: center; font-weight: 800; }
.binding-list i { color: #8b8b92; font: normal 0.62rem ui-monospace, monospace; }
.binding-list b { font: 0.65rem ui-monospace, monospace; }
.binding-stage { min-width: 0; padding-top: 1.6rem; background: var(--white); }
.binding-meta { display: flex; justify-content: space-between; padding: 0 2rem; color: #77777e; font: 0.68rem ui-monospace, monospace; }
.binding-meta a { text-decoration: none; }
.binding-stage h3 { margin: 2rem 2rem 0.5rem; font-size: 2.3rem; letter-spacing: -0.045em; }
.binding-stage > p { margin: 0 2rem 1.2rem; color: #66666c; }
.binding-stage pre { min-height: 18rem; background: #111116; }
.more-bindings { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #d4d4d0; margin-top: 5rem; }
.more-bindings article { min-height: 14rem; padding: 1.5rem; border-right: 1px solid #d4d4d0; border-bottom: 1px solid #d4d4d0; }
.more-bindings article:nth-child(3n) { border-right: 0; }
.more-bindings span, .example-tag { color: var(--ruby-deep); font: 700 0.65rem ui-monospace, monospace; letter-spacing: 0.08em; }
.more-bindings h3 { margin: 3.5rem 0 0.5rem; font-size: 1.15rem; }
.more-bindings p { margin: 0; color: #6b6b72; font-size: 0.86rem; }

.examples-section { background: #16161c; }
.examples-heading p { color: #aaaab3; }
.example-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 5rem; }
.example-grid > a { padding: 0.8rem 0.8rem 1.5rem; border: 1px solid var(--line); border-radius: 1.2rem; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.example-grid > a:hover { transform: translateY(-0.3rem); border-color: rgba(255,255,255,.42); }
.example-visual { height: 14rem; display: flex; align-items: center; justify-content: center; gap: 0.8rem; margin-bottom: 1.3rem; border-radius: 0.8rem; background: #0c0c10; overflow: hidden; font-family: ui-monospace, monospace; }
.visual-d1 { flex-direction: column; align-items: start; padding: 2rem; background: linear-gradient(145deg, #1e2132, #0c0c10); }
.visual-d1 span { color: var(--cloud); font-size: 0.7rem; }
.visual-d1 strong { font-size: 1.15rem; }
.visual-d1 i { align-self: end; padding: 0.3rem 0.6rem; border-radius: 999px; background: #dff7e8; color: #126732; font: normal 0.65rem ui-monospace, monospace; }
.visual-ai { flex-direction: column; align-items: start; padding: 2rem; background: radial-gradient(circle at 70% 30%, rgba(255,54,84,.25), transparent 8rem), #0c0c10; }
.visual-ai span { color: var(--muted); font-size: 0.68rem; }
.visual-ai b { display: block; height: 0.5rem; border-radius: 999px; background: linear-gradient(90deg, var(--ruby), var(--cloud)); }
.visual-ai b:nth-child(2) { width: 78%; }.visual-ai b:nth-child(3) { width: 54%; }.visual-ai b:nth-child(4) { width: 68%; }
.visual-rag { background: linear-gradient(145deg, #171821, #09090c); }
.visual-rag span { display: grid; place-items: center; width: 4.1rem; height: 4.1rem; border: 1px solid #41414b; border-radius: 50%; font-size: 0.6rem; }
.visual-rag span:first-child { border-color: var(--ruby); }.visual-rag span:last-child { border-color: var(--cloud); }
.visual-rag i { color: #777780; font-style: normal; }
.example-grid h3 { margin: 0.5rem 0; font-size: 1.25rem; }
.example-grid p { margin: 0; color: #9b9ba4; font-size: 0.84rem; }

.links-section { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 8vw; background: var(--cloud); color: var(--ink); }
.links-section .section-number { color: rgba(16,16,20,.65); }
.links-lead h2 { max-width: 8ch; }
.link-list { border-top: 1px solid rgba(16,16,20,.4); }
.link-list a { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; border-bottom: 1px solid rgba(16,16,20,.4); text-decoration: none; }
.link-list span { display: flex; align-items: center; gap: 1.2rem; }
.link-list i { font: normal 0.65rem ui-monospace, monospace; }
.link-list b { font-size: 1.05rem; }
.link-list em { font: normal 0.72rem ui-monospace, monospace; }
.link-list a:hover b { text-decoration: underline; }

footer { min-height: 9rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; padding: 2rem 4vw; background: #0a0a0d; border-top: 1px solid var(--line); }
footer p { margin: 0; color: #7f7f88; font-size: 0.75rem; text-align: center; }
footer > a:last-child { justify-self: end; color: #b8b8c0; font-size: 0.75rem; text-decoration: none; }

.guide-page { background: var(--paper); color: var(--ink); }
.guide-page .site-header { position: absolute; color: var(--white); }
.guide-page .site-nav a[aria-current="page"] { color: var(--white); }
.guide-hero {
  min-height: 30rem;
  padding: 9.5rem 6vw 4rem;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 47%, rgba(125,214,255,.16), transparent 20rem),
    radial-gradient(circle at 55% 80%, rgba(255,54,84,.12), transparent 24rem),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    #101014;
  background-size: auto, auto, 4.5rem 4.5rem, 4.5rem 4.5rem, auto;
}
.guide-hero h1 { max-width: none; font-size: clamp(3.6rem, 7vw, 7.5rem); }
.guide-hero > div > p:nth-child(3) { max-width: 40rem; margin: 1.2rem 0 0; color: #b9bac3; font-size: 1.05rem; }
.guide-quick-toc { max-width: 66rem; margin-top: 2.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.guide-quick-toc > p { margin: 0 0 .8rem; color: var(--cloud); font: .64rem ui-monospace, monospace; letter-spacing: .1em; }
.guide-quick-toc > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.guide-quick-toc a { padding: .45rem .65rem; border: 1px solid #3b3b44; border-radius: 999px; color: #d8d8de; font: .72rem ui-monospace, monospace; text-decoration: none; }
.guide-quick-toc a:hover, .guide-quick-toc a:focus-visible { border-color: var(--cloud); color: var(--white); }

.guide-intro { background: #ecece7; }
.guide-intro .section-number { color: #6e6e75; }
.guide-intro-grid { display: grid; grid-template-columns: 1fr 0.75fr; gap: 10vw; align-items: end; }
.guide-intro-grid h2 { margin: 0; font-size: clamp(3rem, 6vw, 6.5rem); line-height: .96; letter-spacing: -.065em; }
.guide-intro-grid p { margin: 0 0 1rem; color: #5a5a61; font-size: 1.05rem; line-height: 1.8; }
.guide-intro-grid p:last-child { margin-bottom: 0; }
.guide-intro-grid code, .guide-card-heading code, .guide-limit code { font: .9em ui-monospace, monospace; }
.guide-principles { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 6rem; border-top: 1px solid #d0d0cc; }
.guide-principles article { min-height: 13rem; padding: 1.4rem 2rem 1.4rem 0; border-right: 1px solid #d0d0cc; }
.guide-principles article:not(:first-child) { padding-left: 2rem; }
.guide-principles article:last-child { border-right: 0; }
.guide-principles span { color: var(--ruby-deep); font: .65rem ui-monospace, monospace; }
.guide-principles h3 { margin: 3rem 0 .5rem; font-size: 1.2rem; letter-spacing: -.03em; }
.guide-principles p { margin: 0; color: #66666d; font-size: .88rem; }

.guide-layout { background: var(--paper); }
.guide-content { display: grid; gap: 2rem; max-width: 76rem; }
.guide-card { position: relative; padding: 2.5rem; border: 1px solid #d5d5d1; border-radius: 1.3rem; background: #fff; scroll-margin-top: 2rem; }
.guide-card-dark { border-color: #26262d; color: var(--white); background: #15151a; }
.guide-card-heading { display: grid; grid-template-columns: minmax(0, .8fr) minmax(16rem, 1.2fr); gap: .8rem 5vw; align-items: end; }
.guide-card-heading > span { grid-column: 1 / -1; color: var(--ruby-deep); font: .66rem ui-monospace, monospace; letter-spacing: .08em; }
.guide-card-dark .guide-card-heading > span { color: var(--cloud); }
.guide-card-heading h2 { margin: 0; font-size: clamp(2rem, 3.5vw, 3.8rem); line-height: .96; letter-spacing: -.06em; }
.guide-card-heading p { margin: 0; color: #626269; font-size: .93rem; line-height: 1.75; }
.guide-card-dark .guide-card-heading p { color: #acaeb7; }
.guide-card pre { margin: 2.5rem 0 0; padding: 1.5rem; border-radius: .85rem; background: #111116; color: #f3f3f5; overflow-x: auto; font: .79rem/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; }
.guide-card:not(.guide-card-dark) pre { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.guide-comment { color: #777782; }
.guide-limit { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid #e0e0dc; color: #68686f; font-size: .78rem; line-height: 1.65; }
.guide-card-dark .guide-limit { border-color: #34343b; color: #a7a8b1; }
.guide-limit b { color: var(--ruby-deep); font: .68rem ui-monospace, monospace; text-transform: uppercase; }
.guide-card-dark .guide-limit b { color: var(--cloud); }
.guide-doc-link { display: inline-block; margin-top: 1.2rem; color: inherit; font: .72rem ui-monospace, monospace; text-decoration: none; border-bottom: 1px solid currentColor; }
.guide-doc-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.guide-doc-links .guide-doc-link { margin-top: 1.2rem; }
.guide-page footer { color: var(--white); }


@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; padding: 0 1.25rem; }
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 8.5rem 1.25rem 2rem; }
  .runtime-card { width: 100%; }
  .section-heading, .start-layout, .rack-intro, .bindings-heading, .examples-heading, .links-section { grid-template-columns: 1fr; }
  .section-pad { padding: 6rem 1.25rem; }
  .possibility-grid { grid-template-columns: 1fr; margin-top: 4rem; }
  .possibility-grid article { min-height: 0; padding: 1.5rem 0; border-right: 0; border-bottom: 1px solid #d4d4d0; }
  .possibility-grid article:not(:first-child) { padding-left: 0; }
  .possibility-grid h3 { margin-top: 2rem; }
  .rack-workbench { grid-template-columns: 1fr; }
  .support-matrix { grid-column: 1; grid-row: auto; border-left: 0; border-top: 1px solid #d3d4d0; }
  .binding-explorer { grid-template-columns: 1fr; }
  .binding-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .binding-list button { border-right: 1px solid #d0d0cc; }
  .more-bindings { grid-template-columns: repeat(2, 1fr); }
  .more-bindings article:nth-child(3n) { border-right: 1px solid #d4d4d0; }
  .more-bindings article:nth-child(2n) { border-right: 0; }
  .example-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; text-align: center; }
  footer .brand, footer > a:last-child { justify-self: center; }
  .guide-hero { min-height: auto; padding: 8.5rem 1.25rem 4rem; }
  .guide-intro-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-principles { grid-template-columns: 1fr; margin-top: 4rem; }
  .guide-principles article, .guide-principles article:not(:first-child) { min-height: auto; padding: 1.5rem 0; border-right: 0; border-bottom: 1px solid #d0d0cc; }
  .guide-principles h3 { margin-top: 1.5rem; }
  .guide-card-heading { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand > span:last-child { display: none; }
  h1 { font-size: clamp(3.8rem, 20vw, 6rem); }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .runtime-flow { align-items: stretch; }
  .runtime-node { min-width: 0; padding: 0.45rem; }
  .runtime-node strong { font-size: 0.66rem; overflow-wrap: anywhere; }
  .runtime-card pre { font-size: 0.7rem; }
  .runtime-status { gap: 1rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats > div { border-bottom: 1px solid var(--line); }
  .hero-stats > div:nth-child(odd) { padding-left: 0; }
  .callout { grid-template-columns: 1fr; }
  .binding-list { grid-template-columns: 1fr; }
  .binding-list button { border-right: 0; }
  .binding-list b { display: none; }
  .binding-stage h3 { font-size: 1.8rem; }
  .binding-stage pre, .code-panel pre { padding: 1.25rem; font-size: 0.7rem; }
  .more-bindings { grid-template-columns: 1fr; }
  .more-bindings article, .more-bindings article:nth-child(3n) { border-right: 0; }
  .links-section { gap: 3rem; }
  .link-list a { align-items: flex-end; }
  .link-list b { font-size: 0.9rem; }
  .guide-card { padding: 1.25rem; }
  .guide-card pre { padding: 1rem; font-size: .69rem; }
  .guide-limit { grid-template-columns: 1fr; gap: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow-line i { animation: none; left: 35%; }
}
