:root {
  --ink: #141414;
  --muted: #62615d;
  --paper: #f6f4ee;
  --white: #fffef9;
  --line: #cbc8bd;
  --yellow: #ffd447;
  --coral: #ff6b4a;
  --green: #40b36c;
  --blue: #176b87;
  --blue-light: #d9edf1;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}
a { color: inherit; }
button, input { font: inherit; }
code, pre, .eyebrow, .section-number, .scope, .status-dot {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.reading-progress {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
}
.reading-progress span { display: block; width: 0; height: 100%; background: var(--coral); }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 62px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; background: var(--ink); color: var(--yellow); font: 700 13px/1 monospace; }
.top-nav { display: flex; gap: 28px; }
.top-nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.top-nav a:hover, .top-nav a:focus-visible { color: var(--ink); }
.status-dot { justify-self: end; color: var(--muted); font-size: 12px; }
.status-dot i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  min-height: calc(100vh - 62px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vh, 116px) 24px 80px;
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
}
.eyebrow { margin: 0 0 24px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2 {
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  letter-spacing: 0;
}
h1 { margin: 0; font-size: clamp(48px, 6.4vw, 82px); font-weight: 700; line-height: 1.08; }
.lede { max-width: 700px; margin: 30px 0 0; color: var(--muted); font-size: 18px; line-height: 1.85; }
.intro-actions { display: flex; align-items: center; gap: 28px; margin-top: 38px; }
.primary-link { padding: 13px 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); font-weight: 700; text-decoration: none; }
.primary-link:hover { background: var(--coral); border-color: var(--coral); }
.text-link { text-underline-offset: 5px; }

.loop-visual { position: relative; min-height: 470px; isolation: isolate; }
.loop-orbit {
  position: absolute;
  inset: 42px 18px 52px;
  border: 1px dashed #8f8d85;
  border-radius: 50%;
  animation: orbit-spin 22s linear infinite;
}
.loop-orbit::before, .loop-orbit::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; inset: 38px; }
.loop-orbit::after { inset: 92px; border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 10%, transparent); }
.orbit-node { position: absolute; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); font-weight: 700; animation: counter-spin 22s linear infinite; }
.node-a { top: -22px; left: calc(50% - 22px); }
.node-b { right: 18px; bottom: 48px; background: var(--coral); color: var(--white); }
.node-c { bottom: 48px; left: 18px; background: var(--blue); color: var(--white); }
.loop-core { position: absolute; top: 50%; left: 50%; display: grid; width: 188px; height: 188px; padding: 32px; place-items: center; transform: translate(-50%, -50%); border-radius: 50%; background: var(--ink); color: var(--white); text-align: center; box-shadow: 0 0 0 18px rgba(20,20,20,.06); }
.loop-core strong { color: var(--yellow); font: 700 30px/1 monospace; }
.loop-core span { align-self: start; color: #bebdb7; font-size: 13px; }
.loop-signal { position: absolute; z-index: -1; width: 90px; height: 90px; border-radius: 50%; filter: blur(1px); }
.signal-one { top: 38px; right: 0; background: var(--yellow); }
.signal-two { bottom: 34px; left: 8px; background: var(--blue-light); }
.visual-caption { position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-end; margin: 0; }
.visual-caption b { font-family: "Songti SC", serif; font-size: 22px; }
.visual-caption span { color: var(--muted); font-size: 13px; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes counter-spin { to { transform: rotate(-360deg); } }

.section-band { padding: 110px max(24px, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--line); }
.section-dark { background: var(--ink); color: var(--white); }
.section-warm { background: #efe7d5; }
.section-blue { background: var(--blue); color: var(--white); }
.section-code { background: #232321; color: var(--white); }
.section-command { background: #dfe8e2; }
.section-plugins { background: #222120; color: var(--white); }
.section-heading { margin-bottom: 54px; }
.heading-split { display: grid; grid-template-columns: 1fr minmax(300px, 440px); align-items: end; gap: 56px; }
.section-number { margin: 0 0 16px; color: var(--coral); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.section-blue .section-number, .section-dark .section-number { color: var(--yellow); }
h2 { max-width: 800px; margin: 0; font-size: clamp(38px, 4.6vw, 62px); line-height: 1.14; }
.heading-note { margin: 0; color: var(--muted); line-height: 1.85; }
.section-blue .heading-note, .section-code .heading-note { color: rgba(255,255,255,.72); }
.section-plugins .heading-note { color: #aaa9a3; }

.four-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #454542; border-bottom: 1px solid #454542; }
.four-grid article { min-height: 225px; padding: 28px; border-right: 1px solid #454542; }
.four-grid article:last-child { border-right: 0; }
.four-grid .index { color: var(--yellow); font: 12px monospace; }
.four-grid h3 { margin: 52px 0 12px; font-size: 23px; }
.four-grid p { margin: 0; color: #aaa9a3; line-height: 1.7; }
.formula { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 46px 0 0; font: 700 clamp(18px, 2.3vw, 28px)/1.5 monospace; }
.formula b { color: var(--coral); }

.instruction-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 64px; }
.file-ladder { border-top: 1px solid var(--line); }
.ladder-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 24px; align-items: start; padding: 26px 0; border-bottom: 1px solid var(--line); }
.scope { width: fit-content; padding: 4px 7px; background: var(--ink); color: var(--white); font-size: 10px; }
.repo-row .scope { background: var(--blue); }
.local-row .scope { background: var(--coral); }
.ladder-row code { font-size: 16px; font-weight: 700; }
.ladder-row p { margin: 9px 0 0; color: var(--muted); line-height: 1.65; }
.priority { color: var(--muted); font-size: 12px; }
.ladder-arrow { padding: 4px 0 4px 108px; color: var(--muted); font-size: 12px; }
.rule-panel { padding: 30px; border: 1px solid var(--ink); background: var(--white); }
.rule-panel h3 { margin: 0 0 20px; font-size: 22px; }
.rule-panel ol { margin: 0; padding-left: 20px; }
.rule-panel li { margin-bottom: 16px; padding-left: 5px; line-height: 1.7; }
.rule-panel code { font-size: 13px; }
.caution { margin-top: 28px; padding-top: 20px; border-top: 4px solid var(--yellow); }
.caution span { font-size: 12px; font-weight: 700; }
.caution p { margin: 8px 0 0; color: var(--muted); line-height: 1.7; }

.loop-track { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--ink); }
.loop-step { position: relative; min-height: 230px; padding: 22px; border-right: 1px solid var(--ink); transition: background .25s ease, color .25s ease; }
.loop-step:last-child { border-right: 0; }
.loop-step::after { content: "→"; position: absolute; z-index: 2; top: 28px; right: -10px; display: grid; width: 20px; height: 20px; place-items: center; background: #efe7d5; font-size: 13px; }
.loop-step:last-child::after { content: "↺"; right: 10px; background: transparent; }
.loop-step span { font: 11px monospace; }
.loop-step h3 { margin: 72px 0 10px; font-size: 20px; }
.loop-step p { margin: 0; color: #686157; font-size: 14px; line-height: 1.6; }
.loop-step.active-step { background: var(--ink); color: var(--white); }
.loop-step.active-step p { color: #b9b7b0; }
.loop-insight { display: flex; justify-content: space-between; gap: 30px; align-items: center; margin-top: 32px; padding-top: 28px; border-top: 1px solid #bdb3a0; }
.loop-insight p { max-width: 690px; margin: 0; line-height: 1.7; }
.loop-insight code { padding: 12px 14px; background: var(--yellow); font-size: 12px; }

.goal-comparison { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.comparison-column { min-height: 340px; padding: 38px; }
.comparison-column + .comparison-column { border-left: 1px solid var(--ink); }
.comparison-label { padding: 5px 8px; background: var(--ink); color: var(--white); font: 11px monospace; }
.goal-column { background: var(--yellow); }
.goal-column .comparison-label { background: var(--coral); }
.comparison-column h3 { margin: 44px 0 24px; font-size: 27px; }
.comparison-column ul { margin: 0 0 34px; padding-left: 20px; line-height: 2; }
.comparison-column p { margin: 0; color: var(--muted); line-height: 1.7; }
.goal-state-line { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 42px; }
.goal-state-line span { display: inline-flex; align-items: center; gap: 8px; }
.goal-state-line i { width: 10px; height: 10px; border-radius: 50%; }
.state-active { background: var(--blue); }
.state-complete { background: var(--green); }
.state-blocked { background: var(--coral); }
.goal-state-line em { color: var(--muted); font-style: normal; }
.goal-state-line .or { color: var(--muted); font-size: 12px; }
.footnote { max-width: 820px; margin: 34px auto 0; color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }

.command-console { border: 1px solid var(--ink); background: #161817; color: var(--white); }
.console-bar { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 46px; padding: 0 16px; align-items: center; border-bottom: 1px solid #414542; color: #aeb4b0; font: 11px monospace; }
.console-bar > span { display: flex; gap: 6px; }
.console-bar i { width: 8px; height: 8px; border-radius: 50%; background: #68706b; }
.console-bar i:first-child { background: var(--coral); }
.console-bar i:nth-child(2) { background: var(--yellow); }
.console-bar i:last-child { background: var(--green); }
.console-bar b { color: #d8ded9; font-weight: 500; }
.console-bar em { justify-self: end; font-style: normal; }
.console-body { display: grid; grid-template-columns: .78fr 1.22fr; min-height: 260px; }
.composer-line { display: flex; gap: 12px; align-items: center; padding: 38px; border-right: 1px solid #414542; font-size: 22px; }
.composer-line > span { color: var(--green); }
.composer-line code { color: var(--yellow); font-size: 28px; }
.composer-line i { width: 2px; height: 30px; background: var(--white); animation: cursor-blink 1s steps(1) infinite; }
.command-preview { padding: 24px; }
.command-preview > div { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; min-height: 60px; padding: 12px 16px; align-items: center; color: #98a09b; }
.command-preview code { color: #dce2de; font-size: 14px; }
.command-preview .preview-selected { background: #2b302d; color: var(--white); }
.command-preview .preview-selected code { color: var(--yellow); }
.command-preview kbd { padding: 3px 7px; border: 1px solid #606762; border-radius: 3px; font: 11px monospace; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.command-groups { display: grid; grid-template-columns: 1fr 1fr; margin-top: 44px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.command-group { min-width: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.command-group header { display: grid; grid-template-columns: 46px 1fr; min-height: 74px; align-items: center; border-bottom: 1px solid var(--ink); }
.command-group header span { display: grid; height: 100%; place-items: center; border-right: 1px solid var(--ink); font: 11px monospace; }
.command-group h3 { margin: 0; padding: 0 20px; font-size: 20px; }
.command-group dl { margin: 0; }
.command-group dl > div { display: grid; grid-template-columns: 110px 1fr; padding: 17px 20px; border-bottom: 1px solid #aab5ae; }
.command-group dl > div:last-child { border-bottom: 0; }
.command-group dt, .command-group dd { margin: 0; }
.command-group dt code { color: var(--blue); font-size: 14px; font-weight: 700; }
.command-group dd { color: #505751; font-size: 14px; line-height: 1.65; }
.command-runbook { display: grid; grid-template-columns: auto 1fr auto; gap: 34px; align-items: center; margin-top: 46px; padding-top: 30px; border-top: 4px solid var(--coral); }
.command-runbook > p { margin: 0; font-weight: 700; }
.command-runbook ol { display: flex; gap: 12px; align-items: center; margin: 0; padding: 0; list-style: none; }
.command-runbook li { display: flex; gap: 7px; align-items: center; }
.command-runbook li b { color: var(--coral); }
.command-runbook li span { color: var(--muted); font-size: 12px; }
.command-runbook a { font-size: 13px; text-underline-offset: 5px; }
.command-footnote { margin-bottom: 0; }

.disclosure-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; }
.disclosure-item { min-height: 230px; padding: 26px; border: 1px solid rgba(255,255,255,.5); }
.disclosure-item.selected { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.disclosure-item > span { font: 11px monospace; opacity: .72; }
.disclosure-item h3 { margin: 54px 0 14px; font-size: 22px; }
.disclosure-item p { margin: 0; opacity: .76; line-height: 1.7; }
.flow-arrow { display: grid; width: 92px; place-items: center; font: 11px monospace; }
.skill-example { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; margin-top: 58px; align-items: center; }
.skill-example pre { margin: 0; padding: 30px; overflow-x: auto; border: 1px solid rgba(255,255,255,.35); background: #0d3e50; font-size: 15px; line-height: 1.9; }
.skill-example pre span { color: #8fc5d4; }
.skill-example h3 { margin: 0 0 18px; font-size: 26px; }
.skill-example p { line-height: 1.75; }
.mini-rule { padding-top: 20px; border-top: 1px solid rgba(255,255,255,.35); }

.plugin-anatomy { display: grid; grid-template-columns: 1.15fr repeat(4, 1fr); border-top: 1px solid #5b5a55; border-left: 1px solid #5b5a55; }
.plugin-anatomy > div { display: flex; min-height: 150px; padding: 22px; flex-direction: column; justify-content: space-between; border-right: 1px solid #5b5a55; border-bottom: 1px solid #5b5a55; }
.plugin-anatomy b { color: var(--yellow); font-size: 17px; }
.plugin-anatomy span { color: #a7a69f; font-size: 12px; line-height: 1.6; }
.plugin-anatomy .plugin-core { background: var(--yellow); color: var(--ink); }
.plugin-core span { color: var(--ink); font: 11px monospace; }
.plugin-core strong { font: 700 30px/1.1 "Songti SC", serif; }
.plugin-directory-heading { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin: 70px 0 28px; }
.plugin-directory-heading span, .mini-label { color: var(--coral); font: 11px monospace; }
.plugin-directory-heading h3 { margin: 10px 0 0; font: 700 34px/1.2 "Songti SC", serif; }
.plugin-directory-heading p { max-width: 400px; margin: 0; color: #92918b; font-size: 13px; text-align: right; }
.plugin-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #5b5a55; border-left: 1px solid #5b5a55; }
.plugin-item { display: grid; grid-template-columns: 74px 1fr; gap: 24px; min-height: 220px; padding: 26px; border-right: 1px solid #5b5a55; border-bottom: 1px solid #5b5a55; }
.plugin-icon { display: grid; width: 60px; height: 60px; place-items: center; border: 1px solid #787770; color: var(--yellow); font: 700 14px monospace; }
.plugin-item h3 { margin: 3px 0 12px; font-size: 21px; }
.plugin-item p { margin: 0 0 24px; color: #aaa9a3; line-height: 1.7; }
.plugin-item code { display: block; width: fit-content; max-width: 100%; padding: 8px 10px; background: #343330; color: #d8d6ce; font-size: 12px; white-space: normal; }
.plugin-browser .plugin-icon, .plugin-visualize .plugin-icon { background: var(--blue); color: var(--white); border-color: var(--blue); }
.plugin-chrome .plugin-icon, .plugin-documents .plugin-icon { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.plugin-computer .plugin-icon, .plugin-sheets .plugin-icon { background: var(--green); color: var(--ink); border-color: var(--green); }
.plugin-replay .plugin-icon, .plugin-slides .plugin-icon { background: var(--coral); color: var(--white); border-color: var(--coral); }
.plugin-use-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; margin-top: 70px; }
.plugin-install-flow ol { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid #5b5a55; }
.plugin-install-flow li { display: grid; grid-template-columns: 52px 1fr; padding: 18px 0; border-bottom: 1px solid #5b5a55; }
.plugin-install-flow li > span { color: var(--yellow); font: 11px monospace; }
.plugin-install-flow li p { margin: 0; color: #c0beb7; line-height: 1.7; }
.plugin-spotlight { padding-left: 34px; border-left: 4px solid var(--yellow); }
.plugin-spotlight dl { margin: 24px 0 0; }
.plugin-spotlight dl > div { padding: 14px 0; border-bottom: 1px solid #5b5a55; }
.plugin-spotlight dt { color: var(--white); font-weight: 700; }
.plugin-spotlight dd { margin: 7px 0 0; color: #9e9d97; font-size: 13px; line-height: 1.65; }
.plugin-safety-line { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; margin-top: 58px; padding-top: 28px; border-top: 1px solid #5b5a55; }
.plugin-safety-line strong { color: var(--yellow); }
.plugin-safety-line p { margin: 0; color: #9e9d97; font-size: 13px; line-height: 1.7; }
.plugin-safety-line a { color: var(--white); font-size: 13px; text-underline-offset: 5px; }

.chooser { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); border: 1px solid var(--ink); }
.chooser-options { display: flex; flex-direction: column; border-right: 1px solid var(--ink); }
.chooser-options button { min-height: 58px; padding: 14px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.chooser-options button:last-child { border-bottom: 0; }
.chooser-options button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.chooser-options button:focus-visible { outline: 3px solid var(--coral); outline-offset: -3px; }
.chooser-result { display: flex; min-height: 350px; padding: 50px; flex-direction: column; justify-content: center; background: var(--white); }
.chooser-result > span { color: var(--coral); font: 11px monospace; }
.chooser-result h3 { margin: 18px 0; font: 700 40px/1.2 "Songti SC", serif; }
.chooser-result p { max-width: 630px; margin: 0 0 28px; color: var(--muted); line-height: 1.8; }
.chooser-result code { width: fit-content; padding: 8px 10px; background: var(--blue-light); }

.code-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.code-block { border: 1px solid #555550; background: #181817; }
.code-block header { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #555550; color: #b4b3ad; font: 12px monospace; }
.code-block header b { color: var(--yellow); }
.code-block pre { min-height: 260px; margin: 0; padding: 28px; overflow-x: auto; color: #e8e6de; font-size: 14px; line-height: 1.8; }
.accent-code { border-top-color: var(--coral); }
.prompt-pattern { margin-top: 52px; padding-top: 40px; border-top: 1px solid #555550; }
.prompt-pattern > p { color: #aaa9a3; }
.prompt-pattern blockquote { max-width: 940px; margin: 24px 0; font: 700 clamp(22px, 3vw, 36px)/1.55 "Songti SC", serif; }
.prompt-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-tags span { padding: 6px 9px; border: 1px solid #686863; color: #c7c5bd; font-size: 12px; }

.final-check { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; background: var(--yellow); }
.final-check h2 { font-size: clamp(38px, 4vw, 56px); }
.final-check ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.final-check li { display: grid; grid-template-columns: 58px 1fr; padding: 18px 0; border-bottom: 1px solid var(--ink); font-weight: 700; }
.final-check li span { font: 11px monospace; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 30px max(24px, calc((100vw - var(--max)) / 2)); background: var(--ink); color: #aaa9a3; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loop-orbit, .orbit-node { animation: none; }
  .composer-line i { animation: none; }
}

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto; }
  .top-nav { display: none; }
  .intro-band { grid-template-columns: 1fr; min-height: auto; padding-top: 80px; }
  .loop-visual { min-height: 420px; max-width: 520px; width: 100%; margin: 0 auto; }
  .heading-split, .instruction-layout, .skill-example, .final-check { grid-template-columns: 1fr; }
  .plugin-anatomy { grid-template-columns: 1fr 1fr; }
  .plugin-core { grid-column: 1 / -1; }
  .plugin-use-layout { grid-template-columns: 1fr; gap: 42px; }
  .command-runbook { grid-template-columns: 1fr; }
  .command-runbook ol { flex-wrap: wrap; }
  .four-grid { grid-template-columns: 1fr 1fr; }
  .four-grid article:nth-child(2) { border-right: 0; }
  .four-grid article:nth-child(-n+2) { border-bottom: 1px solid #454542; }
  .loop-track { grid-template-columns: repeat(3, 1fr); }
  .loop-step:nth-child(3) { border-right: 0; }
  .loop-step:nth-child(-n+3) { border-bottom: 1px solid var(--ink); }
  .disclosure-flow { grid-template-columns: 1fr; }
  .flow-arrow { width: auto; height: 58px; transform: rotate(90deg); }
}

@media (max-width: 640px) {
  .site-header { min-height: 56px; padding-inline: 16px; }
  .brand { font-size: 14px; }
  .status-dot { display: none; }
  .intro-band { padding: 64px 18px 58px; gap: 28px; }
  h1 { font-size: 45px; }
  .lede { font-size: 16px; }
  .intro-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .loop-visual { min-height: 350px; }
  .loop-orbit { inset: 30px 5px 52px; }
  .loop-core { width: 150px; height: 150px; padding: 24px; }
  .loop-core strong { font-size: 25px; }
  .visual-caption { align-items: flex-start; right: auto; left: 0; }
  .section-band { padding: 76px 18px; }
  .section-heading { margin-bottom: 38px; }
  .heading-split { gap: 22px; }
  h2 { font-size: 38px; }
  .four-grid { grid-template-columns: 1fr; }
  .four-grid article { min-height: 170px; border-right: 0; border-bottom: 1px solid #454542; }
  .four-grid article:last-child { border-bottom: 0; }
  .four-grid h3 { margin-top: 28px; }
  .formula { justify-content: flex-start; }
  .ladder-row { grid-template-columns: 68px 1fr; gap: 14px; }
  .priority { display: none; }
  .ladder-arrow { padding-left: 82px; }
  .rule-panel { padding: 22px; }
  .loop-track { grid-template-columns: 1fr 1fr; }
  .loop-step { min-height: 190px; }
  .loop-step:nth-child(2n) { border-right: 0; }
  .loop-step:nth-child(-n+4) { border-bottom: 1px solid var(--ink); }
  .loop-step h3 { margin-top: 48px; }
  .loop-insight { align-items: flex-start; flex-direction: column; }
  .goal-comparison, .code-pair, .chooser { grid-template-columns: 1fr; }
  .plugin-grid { grid-template-columns: 1fr; }
  .plugin-anatomy { grid-template-columns: 1fr; }
  .plugin-core { grid-column: auto; }
  .plugin-directory-heading { align-items: flex-start; flex-direction: column; }
  .plugin-directory-heading p { text-align: left; }
  .plugin-item { grid-template-columns: 58px 1fr; gap: 16px; min-height: 0; padding: 22px 16px; }
  .plugin-icon { width: 48px; height: 48px; font-size: 12px; }
  .plugin-item p { margin-bottom: 18px; }
  .plugin-spotlight { padding-left: 20px; }
  .plugin-safety-line { grid-template-columns: 1fr; }
  .console-body, .command-groups { grid-template-columns: 1fr; }
  .composer-line { min-height: 130px; padding: 26px; border-right: 0; border-bottom: 1px solid #414542; }
  .console-bar { grid-template-columns: 1fr auto; }
  .console-bar b { justify-self: end; }
  .console-bar em { display: none; }
  .command-preview { padding: 12px; }
  .command-preview > div { grid-template-columns: 90px 1fr; gap: 10px; padding-inline: 10px; }
  .command-preview kbd { display: none; }
  .command-group dl > div { grid-template-columns: 90px 1fr; padding-inline: 14px; }
  .command-runbook { gap: 20px; }
  .command-runbook ol { align-items: flex-start; flex-direction: column; }
  .command-runbook li b { display: none; }
  .comparison-column + .comparison-column { border-left: 0; border-top: 1px solid var(--ink); }
  .goal-state-line { align-items: flex-start; flex-direction: column; }
  .goal-state-line em { transform: rotate(90deg); }
  .goal-state-line .or { display: none; }
  .skill-example { gap: 32px; }
  .chooser-options { border-right: 0; border-bottom: 1px solid var(--ink); }
  .chooser-result { min-height: 330px; padding: 30px 22px; }
  .chooser-result h3 { font-size: 34px; }
  .code-block pre { min-height: auto; padding: 20px; font-size: 12px; }
  .final-check { gap: 42px; }
  .site-footer { flex-direction: column; }
}
