:root {
  color-scheme: light;
  --bg: #f4f4f5;
  --surface: #fbfbfc;
  --surface-strong: #ffffff;
  --ink: #050505;
  --muted: #5f6268;
  --line: #e5e5e8;
  --line-strong: #111111;
  --accent: #2fb36d;
  --accent-dark: #148449;
  --accent-soft: #e5f6ed;
  --yellow: #ffdc5e;
  --yellow-border: #b88900;
  --blue: #356fbe;
  --blue-border: #214a86;
  --green: #35bd72;
  --green-border: #16814c;
  --red: #ef5164;
  --red-border: #a62d3d;
  --purple: #8e66d9;
  --purple-border: #5d3ca6;
  --warning: #9d6a00;
  --warning-soft: #fff2bd;
  --private: #9c3a59;
  --private-soft: #ffe4eb;
  --code-bg: #11191b;
  --code-ink: #f5f8f8;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --max: 1280px;
  --repo-bg: #06090f;
  --repo-line: #1d2430;
  --repo-ink: #d8dee9;
  --repo-ink-muted: #b6c0d1;
  --menu-bg: #ffffff;
  --menu-shadow: 0 18px 38px rgba(8, 12, 20, 0.14);
  --context-bg: #0d0d11;
  --context-surface: #111217;
  --context-line: rgba(255, 255, 255, 0.08);
  --context-line-strong: rgba(255, 255, 255, 0.14);
  --context-ink: #f2f3f5;
  --context-muted: #a6acb8;
  --context-hover: rgba(255, 255, 255, 0.03);
  --header-action-font-size: 0.95rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

code,
pre {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
}

:not(pre) > code {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-strong);
  padding: 0.06rem 0.22rem;
  color: var(--ink);
  font-size: 0.92em;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(244, 244, 245, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  height: 2rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface-strong);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: 0.9rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.repo-badge {
  min-height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3d4655;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  white-space: nowrap;
  font-size: var(--header-action-font-size);
}

.repo-badge:hover,
.repo-badge:focus-visible {
  color: #0f1724;
  outline: none;
}

.repo-badge-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.repo-badge-name {
  color: currentColor;
  font-weight: 500;
}

.header-actions.is-tight .repo-badge-name {
  display: none;
}

.repo-badge-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #606b7d;
  font-weight: 500;
}

.header-actions.is-tight .repo-badge-stars {
  gap: 0;
}

.repo-star-icon {
  width: 0.92rem;
  height: 0.92rem;
  flex: 0 0 auto;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius);
  font-size: var(--header-action-font-size);
  font-weight: 400;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-dark);
  outline: none;
}

.nav a[data-priority="3"] {
  order: 3;
}

.nav a[data-priority="4"] {
  order: 4;
}

.nav a[data-priority="2"] {
  order: 2;
}

.nav a[data-priority="1"] {
  order: 1;
}

.hero-section,
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.hero-section {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1.25rem;
}

.hero-copy {
  max-width: 760px;
}

.page-context-menu {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  min-width: 0;
  background: transparent;
}

.page-context-menu::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 3rem;
  width: 1px;
  background: var(--line);
  transition: background-color 160ms ease;
  pointer-events: none;
}

.page-context-menu:has(.page-context-button:hover)::after,
.page-context-menu:has(.page-context-button:focus-visible)::after {
  background: var(--ink);
}

.page-context-button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  min-height: 2.8rem;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.page-context-button:hover,
.page-context-button:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.page-context-copy {
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-size: var(--header-action-font-size);
  font-weight: 600;
}

.page-context-copy svg {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
}

.page-context-copy span {
  white-space: nowrap;
}

.page-context-toggle {
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  width: 3rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-context-toggle svg {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  transition: transform 180ms ease, color 160ms ease;
}

.page-context-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
  color: var(--ink);
}

.page-context-menu.is-compact::after {
  display: none;
}

.page-context-menu.is-compact .page-context-copy {
  width: 2.85rem;
  justify-content: center;
  padding-inline: 0;
}

.page-context-menu.is-compact .page-context-copy span {
  display: none;
}

.page-context-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 8;
  width: min(92vw, 560px);
  border: 1px solid var(--context-line);
  border-radius: calc(var(--radius) * 2);
  background: rgba(13, 13, 17, 0.99);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  padding: 0.7rem;
  backdrop-filter: blur(18px);
}

.page-context-dropdown[hidden] {
  display: none;
}

.context-option {
  width: 100%;
  border: 0;
  border-radius: calc(var(--radius) * 1.5);
  background: transparent;
  color: var(--context-ink);
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 3.15rem minmax(0, 1fr);
  column-gap: 0.9rem;
  align-items: flex-start;
  padding: 0.8rem 0.75rem;
}

.context-option:hover,
.context-option:focus-visible {
  background: var(--context-hover);
  outline: none;
}

.context-option-copy {
  display: grid;
  gap: 0.16rem;
  padding-top: 0.08rem;
}

.context-option-title {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--context-ink);
}

.context-option-description {
  color: var(--context-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.context-option-external {
  color: var(--context-muted);
  font-size: 0.88em;
}

.context-option-icon-wrap {
  width: 3.15rem;
  height: 3.15rem;
  border: 1px solid var(--context-line);
  border-radius: calc(var(--radius) * 1.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.01);
}

.context-option-icon {
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--context-muted);
}

.context-option-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.context-option-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.context-option-icon img[src$="vscode.svg"] {
  object-position: left center;
}

.kicker {
  margin: 0 0 0.65rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  position: relative;
}

.heading-anchor {
  position: absolute;
  right: calc(100% + 0.4rem);
  top: 0.15em;
  color: #9aa3b2;
  text-decoration: none;
  font-size: 0.62em;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transition: opacity 120ms ease;
}

.heading-anchor:hover,
.heading-anchor:focus-visible {
  color: #263547;
  outline: none;
}

h1:hover .heading-anchor,
h1:focus-within .heading-anchor,
h2:hover .heading-anchor,
h2:focus-within .heading-anchor {
  opacity: 1;
}

h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(2.55rem, 4.9vw, 4.3rem);
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
}

.lead {
  max-width: 635px;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.26rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button,
.mini-button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0.68rem 0.95rem;
  font-weight: 700;
}

.button:hover,
.button:focus-visible,
.mini-button:hover,
.mini-button:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.button.primary .button-meta {
  color: #c8f4dc;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.button.black {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.button.black:hover,
.button.black:focus-visible {
  background: #000;
  border-color: #000;
  color: white;
}

.mini-button {
  min-height: 2rem;
  padding: 0.34rem 0.55rem;
  font-size: 0.82rem;
}

.button-meta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7ch;
  min-width: 7ch;
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: color 140ms ease;
}

.button-meta::after {
  content: "";
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  margin: auto;
  background-color: var(--muted);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1a.75.75 0 0 1 .75.75v6.19l2.22-2.22a.75.75 0 1 1 1.06 1.06L8.53 10.28a.75.75 0 0 1-1.06 0L3.97 6.78a.75.75 0 1 1 1.06-1.06l2.22 2.22V1.75A.75.75 0 0 1 8 1ZM2.75 11a.75.75 0 0 1 .75.75v1.5h9v-1.5a.75.75 0 0 1 1.5 0v2.25a.75.75 0 0 1-.75.75h-10.5a.75.75 0 0 1-.75-.75v-2.25a.75.75 0 0 1 .75-.75Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1a.75.75 0 0 1 .75.75v6.19l2.22-2.22a.75.75 0 1 1 1.06 1.06L8.53 10.28a.75.75 0 0 1-1.06 0L3.97 6.78a.75.75 0 1 1 1.06-1.06l2.22 2.22V1.75A.75.75 0 0 1 8 1ZM2.75 11a.75.75 0 0 1 .75.75v1.5h9v-1.5a.75.75 0 0 1 1.5 0v2.25a.75.75 0 0 1-.75.75h-10.5a.75.75 0 0 1-.75-.75v-2.25a.75.75 0 0 1 .75-.75Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0;
  transition: opacity 140ms ease;
}

#downloadBundle:hover .button-meta,
#downloadBundle:focus-visible .button-meta,
#downloadBundleInstall:hover .button-meta,
#downloadBundleInstall:focus-visible .button-meta,
#downloadBundleDeveloper:hover .button-meta,
#downloadBundleDeveloper:focus-visible .button-meta {
  color: transparent;
}

#downloadBundle:hover .button-meta::after,
#downloadBundle:focus-visible .button-meta::after,
#downloadBundleInstall:hover .button-meta::after,
#downloadBundleInstall:focus-visible .button-meta::after,
#downloadBundleDeveloper:hover .button-meta::after,
#downloadBundleDeveloper:focus-visible .button-meta::after {
  opacity: 1;
}

#downloadSetupZip:hover .button-meta,
#downloadSetupZip:focus-visible .button-meta {
  color: transparent;
}

#downloadSetupZip:hover .button-meta::after,
#downloadSetupZip:focus-visible .button-meta::after {
  background-color: white;
  opacity: 1;
}

#downloadBundleInstall:hover .button-meta::after,
#downloadBundleInstall:focus-visible .button-meta::after {
  background-color: white;
}

.setup-page {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.setup-header-button {
  min-height: 2.2rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.setup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem);
  gap: 2rem;
  align-items: end;
  padding: clamp(3rem, 8vw, 5.8rem) 0 2rem;
}

.setup-hero h1 {
  max-width: 15ch;
  margin: 0.2rem 0 0;
  font-size: clamp(2.55rem, 4.9vw, 4.3rem);
  line-height: 1;
  letter-spacing: 0;
}

.setup-local-panel,
.setup-step,
.setup-download-panel,
.setup-callout,
.setup-suggestion,
.setup-custom-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.setup-local-panel {
  padding: 1rem;
}

.setup-local-panel p {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.setup-ai-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  color: var(--muted);
  background: var(--bg);
  font-weight: 700;
}

.setup-ai-toggle > span:first-child {
  min-width: 0;
  flex: 1;
}

.setup-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 1.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #dfe2e7;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
  padding: 0;
}

.setup-switch span {
  width: 1.05rem;
  height: 1.05rem;
  margin-left: 0.18rem;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid #c9ced6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.setup-disabled-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.setup-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.setup-steps {
  display: grid;
  gap: 0.85rem;
}

.setup-step {
  overflow: clip;
  scroll-margin-top: 5.5rem;
}

.setup-step summary {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, auto) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  min-height: 4rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.setup-step summary::-webkit-details-marker {
  display: none;
}

.setup-step summary > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 700;
}

.setup-step summary strong {
  font-size: 1.05rem;
}

.setup-step summary small {
  color: var(--muted);
  font-size: 0.9rem;
}

.setup-step[open] summary {
  border-bottom: 1px solid var(--line);
}

.setup-step-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.setup-next-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.25rem;
}

.setup-field,
.setup-check {
  display: grid;
  gap: 0.35rem;
}

.setup-field span,
.setup-check span {
  font-weight: 700;
}

.setup-field small {
  color: var(--muted);
  font-size: 0.87rem;
}

.setup-field input,
.setup-field select,
.setup-field textarea,
.setup-suggestion textarea,
.setup-preview-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.setup-field input,
.setup-field select {
  min-height: 2.7rem;
  padding: 0.65rem 0.75rem;
}

.setup-field textarea,
.setup-suggestion textarea,
.setup-preview-editor {
  min-height: 7rem;
  padding: 0.75rem;
  resize: vertical;
  line-height: 1.45;
}

.setup-field input:focus,
.setup-field select:focus,
.setup-field textarea:focus,
.setup-suggestion textarea:focus,
.setup-preview-editor:focus {
  border-color: var(--ink);
  outline: none;
}

.setup-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
}

.setup-check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
}

.setup-callout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  padding: 0.8rem;
  background: var(--private-soft);
  border-color: var(--private);
  color: var(--private);
}

.setup-suggestions,
.setup-custom-sections {
  display: grid;
  gap: 0.75rem;
}

#suggestedSections,
#customSections {
  display: grid;
  gap: 0.85rem;
}

.setup-suggestions h3,
.setup-custom-sections h3,
.setup-validation-grid h3 {
  margin: 0;
  font-size: 1rem;
}

.setup-suggestion,
.setup-custom-section {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
}

.setup-suggestion p,
.setup-empty-note,
.setup-hint,
.setup-review-note,
.setup-edit-guard p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.setup-hint strong {
  color: var(--ink);
}

.setup-custom-header,
.setup-custom-row,
.setup-review-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
}

.setup-custom-row .setup-field {
  flex: 1;
}

.setup-preview-select {
  flex: 1;
}

#regeneratePreview {
  align-self: end;
}

.setup-icon-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  min-width: 2.7rem;
  height: 2.7rem;
  padding: 0;
}

.setup-icon-button:hover,
.setup-icon-button:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.setup-icon-button svg {
  width: 1.05rem;
  height: 1.05rem;
}

.setup-dialog {
  width: min(28rem, calc(100% - 2rem));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--menu-shadow);
}

.setup-dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
}

.setup-dialog form {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.setup-dialog h2 {
  font-size: 1.35rem;
}

.setup-dialog p {
  margin: 0;
  color: var(--muted);
}

.setup-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.setup-dialog-actions .button,
.setup-dialog-actions .mini-button {
  min-height: 2.65rem;
  padding: 0.68rem 0.95rem;
  font-size: 1rem;
  line-height: 1;
}

.setup-edit-guard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius);
  background: var(--warning-soft);
  padding: 0.85rem;
}

.setup-edit-guard[hidden] {
  display: none;
}

.setup-edit-guard strong {
  display: block;
  margin-bottom: 0.2rem;
}

.lock-unlock-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}

.lock-unlock-icon svg {
  width: 0.88rem;
  height: 0.88rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.setup-editor-meta {
  min-height: 1.35rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
}

.setup-preview-editor {
  min-height: 28rem;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: 0.86rem;
}

.setup-preview-editor.is-locked {
  border-color: var(--yellow-border);
}

.setup-validation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.setup-validation-list {
  display: grid;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.setup-validation-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.setup-validation-list li.pass {
  border-color: var(--green-border);
  background: #ecf9f1;
  color: var(--green-border);
}

.setup-validation-list li.warn {
  border-color: var(--yellow-border);
  background: var(--warning-soft);
  color: var(--warning);
}

.setup-validation-list li.fail {
  border-color: var(--red-border);
  background: #fff0f2;
  color: var(--red-border);
}

.setup-download-panel {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.setup-download-panel p,
.setup-first-use-prompt p {
  margin: 0;
  color: var(--muted);
}

.setup-first-use-prompt {
  display: grid;
  gap: 0.35rem;
}

.setup-first-use-prompt code {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 0.7rem;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: normal;
}

@media (max-width: 860px) {
  .setup-hero,
  .setup-validation-grid {
    grid-template-columns: 1fr;
  }

  .setup-step summary {
    grid-template-columns: 2.1rem minmax(0, 1fr);
  }

  .setup-step summary small {
    grid-column: 2;
  }

  .setup-custom-header,
  .setup-custom-row,
  .setup-review-toolbar,
  .setup-edit-guard {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-preview-editor {
    min-height: 22rem;
  }
}

.hero-panel {
  min-width: 0;
}

.folder-shell {
  --folder-header-height: 3.25rem;
  --folder-body-height: 18.9125rem;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: var(--folder-header-height) var(--folder-body-height);
}

.folder-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 0;
  height: var(--folder-header-height);
  padding: 0;
  background: var(--ink);
  color: white;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-weight: 700;
}

.folder-title-main {
  min-width: 0;
  padding: 0.9rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.folder-view-toggle {
  width: 3rem;
  align-self: stretch;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.folder-view-toggle:hover,
.folder-view-toggle:focus-visible {
  outline: none;
  color: #ffffff;
  border-left-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.folder-view-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 180ms ease;
}

.folder-shell[data-view="tree"] .folder-view-toggle svg {
  transform: rotate(180deg);
}

.folder-icon {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
}

.folder-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.folder-body {
  position: relative;
  height: var(--folder-body-height);
  overflow: hidden;
}

.folder-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 1px;
  height: 100%;
  overflow: hidden;
  background: var(--line);
}

.folder-grid span {
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  background: var(--surface-strong);
  color: var(--ink);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
  monospace;
  font-size: 0.88rem;
}

.folder-grid span:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.folder-tree {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 1rem 1.05rem;
  background: #080b13;
  color: #cad6eb;
  font-size: 0.78rem;
  line-height: 1.42;
  height: 100%;
  overflow: hidden;
}

.folder-tree code {
  display: block;
  white-space: pre;
}

.folder-shell[data-view="tree"] .folder-grid {
  display: none;
}

.folder-shell[data-view="grid"] .folder-tree {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.band {
  max-width: none;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.band > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

#install {
  max-width: none;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

#install > * {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2rem;
}

.section-heading.compact {
  margin-bottom: 1.35rem;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 1.03rem;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.principle,
.manifest-card,
.install-step,
.developer-card,
.slot-detail,
.validator,
.flow-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.principle,
.manifest-card {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.principle:hover,
.principle:focus-within,
.manifest-card:hover,
.manifest-card:focus-within {
  border-color: var(--ink);
  box-shadow: var(--shadow);
  transform: none;
}

.principle {
  min-height: 180px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.principle:nth-child(1) {
  background: var(--purple);
  border-color: var(--purple-border);
  color: white;
}

.principle:nth-child(2),
.manifest-card:nth-child(2) {
  background: var(--green);
  border-color: var(--green-border);
}

.principle:nth-child(3),
.manifest-card:nth-child(3) {
  background: var(--yellow);
  border-color: var(--yellow-border);
}

.principle:nth-child(4),
.manifest-card:nth-child(1) {
  background: var(--red);
  border-color: var(--red-border);
  color: white;
}

.principle:nth-child(5),
.manifest-card:nth-child(4) {
  background: var(--blue);
  border-color: var(--blue-border);
  color: white;
}

.principle:nth-child(1):hover,
.principle:nth-child(1):focus-within {
  border-color: var(--purple-border);
}

.principle:nth-child(2):hover,
.principle:nth-child(2):focus-within,
.manifest-card:nth-child(2):hover,
.manifest-card:nth-child(2):focus-within {
  border-color: var(--green-border);
}

.principle:nth-child(3):hover,
.principle:nth-child(3):focus-within,
.manifest-card:nth-child(3):hover,
.manifest-card:nth-child(3):focus-within {
  border-color: var(--yellow-border);
}

.principle:nth-child(4):hover,
.principle:nth-child(4):focus-within,
.manifest-card:nth-child(1):hover,
.manifest-card:nth-child(1):focus-within {
  border-color: var(--red-border);
}

.principle:nth-child(5):hover,
.principle:nth-child(5):focus-within,
.manifest-card:nth-child(4):hover,
.manifest-card:nth-child(4):focus-within {
  border-color: var(--blue-border);
}

.principle p,
.flow-step p,
.validator p,
.install-step p,
.developer-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.principle:nth-child(1) p,
.principle:nth-child(4) p,
.principle:nth-child(5) p,
.manifest-card:nth-child(1) p,
.manifest-card:nth-child(4) p {
  color: rgba(255, 255, 255, 0.84);
}

.principle:nth-child(2) p,
.manifest-card:nth-child(2) p {
  color: rgba(0, 0, 0, 0.66);
}

.explorer-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.slot-list {
  display: grid;
  gap: 0.55rem;
}

.slot-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  padding: 0.8rem;
  text-align: left;
}

.slot-button:hover,
.slot-button:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.slot-button[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.slot-button[aria-selected="true"] span {
  color: rgba(255, 255, 255, 0.72);
}

.slot-button strong,
.slot-button span {
  display: block;
}

.slot-button strong {
  font-size: 0.95rem;
}

.slot-button span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.slot-detail {
  min-width: 0;
  overflow: hidden;
}

.slot-detail-top {
  padding: 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

#slotPurpose {
  padding: 0 1.1rem;
  color: var(--muted);
}

.load-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--warning);
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 1.1rem 1.1rem;
}

.metadata-grid div {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.metadata-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metadata-grid dd {
  margin: 0.2rem 0 0;
}

.code-toolbar {
  min-height: 2.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f1f5f2;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.code-toolbar span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: 0.8rem;
}

.code-block {
  margin: 0;
  max-width: 100%;
  overflow: auto;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1rem;
  font-size: 0.84rem;
  line-height: 1.55;
}

.code-block code {
  display: block;
  white-space: pre;
}

.code-block .token-comment {
  color: #6e8a8d;
}

.code-block .token-string {
  color: #8ed46a;
}

.code-block .token-number,
.code-block .token-boolean,
.code-block .token-null {
  color: #f6ba5f;
}

.code-block .token-keyword {
  color: #76c8ff;
}

.code-block .token-symbol {
  color: #8ec5ff;
}

.slot-detail.code-light .code-block .token-comment {
  color: #5b6b6d;
}

.slot-detail.code-light .code-block .token-string {
  color: #2e7d32;
}

.slot-detail.code-light .code-block .token-number,
.slot-detail.code-light .code-block .token-boolean,
.slot-detail.code-light .code-block .token-null {
  color: #b26a00;
}

.slot-detail.code-light .code-block .token-keyword {
  color: #005a9c;
}

.slot-detail.code-light .code-block .token-symbol {
  color: #2a4f8f;
}

.install-step .code-block code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#developers {
  border-top: 0;
}

.slot-detail .code-block {
  max-height: 430px;
}

.slot-detail.code-light .code-block {
  background: var(--surface-strong);
  color: var(--ink);
}

.disclosure-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.flow-step {
  padding: 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
}

.validator {
  margin-top: 1rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
  gap: 1rem;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.check-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 0.62rem 0.7rem;
}

.check-list li.pass {
  border-color: var(--accent);
}

.check-list li.fail {
  border-color: var(--red);
}

.install-layout,
.developer-grid {
  display: grid;
  gap: 1rem;
}

.install-layout {
  grid-template-columns: 1fr;
}

.developer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.question-grid {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.question-stage {
  min-width: 0;
}

.question-tabs {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.question-tab {
  border: 1px solid rgba(5, 5, 5, 0.06);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  min-width: 0;
  padding: 0.78rem 1rem;
  text-align: left;
  display: block;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.question-tab:hover,
.question-tab:focus-visible {
  border-color: rgba(5, 5, 5, 0.08);
  background: #ffffff;
  box-shadow: none;
  outline: none;
}

.question-tab.active {
  border-color: rgba(5, 5, 5, 0.1);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(5, 5, 5, 0.05);
}

.question-tab.waiting {
  border-color: rgba(255, 220, 94, 0.42);
  box-shadow:
    0 10px 24px rgba(5, 5, 5, 0.06),
    0 0 0 3px rgba(255, 220, 94, 0.16);
}

.question-tab.active.waiting {
  border-color: rgba(255, 220, 94, 0.52);
}

.question-tab-title {
  display: block;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.4;
}

.install-step,
.developer-card,
.question-card {
  min-width: 0;
  overflow: hidden;
}

.install-step,
.developer-card {
  padding: 1rem;
}

.install-step {
  position: relative;
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1rem;
}

.install-heading {
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) auto;
  align-items: end;
  gap: 2rem;
}

.install-heading p:last-child {
  margin-bottom: 0;
}

.install-step-number {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}

.install-step-body {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
}

.install-step-body h3,
.developer-card h3 {
  margin-bottom: 0;
}

.install-step-body p {
  margin: 0;
}

.install-step-body .button {
  justify-self: start;
}

.install-instruction-panel {
  width: min(50%, 760px);
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.install-code-stack {
  display: grid;
  gap: 0.9rem;
  width: 100%;
  min-width: 0;
}

.install-code-group {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.developer-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.developer-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.developer-download-row h3 {
  margin: 0;
}

.developer-download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.developer-download-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.developer-download-icon:hover,
.developer-download-icon:focus-visible {
  border-color: var(--ink);
  background: var(--surface-strong);
  outline: none;
  transform: translateY(-1px);
}

.platform-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  width: fit-content;
}

.platform-option {
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 2rem;
  padding: 0.36rem 0.62rem;
  font-weight: 800;
}

.platform-option:hover,
.platform-option:focus-visible {
  color: var(--ink);
  outline: none;
}

.platform-option.active {
  background: var(--ink);
  color: white;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #212121;
  padding: 0;
  min-height: 0;
  box-shadow: var(--shadow);
}

.question-chat {
  height: 420px;
  display: flex;
  flex-direction: column;
  background: #212121;
  color: #eeeeee;
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
}

.llm-badge {
  width: max-content;
  min-height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 0.7rem;
  color: #cdcdcd;
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.self-badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #cdcdcd;
}

.chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.35rem 1.1rem 1.15rem;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.chat-thread::before {
  content: "";
  margin-top: auto;
}

.thread-message {
  width: min(100%, 760px);
  margin-inline: auto;
  display: flex;
  gap: 0.75rem;
  color: #eeeeee;
}

.user-message {
  justify-content: flex-end;
}

.assistant-message {
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
}

.message-bubble {
  max-width: min(78%, 640px);
  border-radius: 1.35rem;
  padding: 0.75rem 1rem;
  line-height: 1.5;
}

.user-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: #eeeeee;
}

.assistant-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #eeeeee;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.self-avatar {
  border-color: rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #eeeeee;
}

.assistant-copy {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 0.45rem;
  padding-left: 2.75rem;
}

.assistant-copy p,
.sample-response {
  margin: 0;
  color: #eeeeee;
  font-size: 1rem;
  line-height: 1.58;
}

.tool-call-stack {
  display: grid;
  padding-top: 0.12rem;
}

.tool-status {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  width: max-content;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #b4b4b4;
  font-size: 0.96rem;
  font: inherit;
  cursor: pointer;
}

.tool-status:hover,
.tool-status:focus-visible {
  color: #eeeeee;
  outline: none;
}

.tool-status:disabled {
  cursor: default;
  color: #b4b4b4;
}

.tool-status-icon {
  position: relative;
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.tool-status-icon::before {
  content: "";
  position: absolute;
  left: 48%;
  top: 50%;
  width: 0.34rem;
  height: 0.34rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tool-status[aria-expanded="true"] .tool-status-icon::before {
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.tool-file-list {
  display: grid;
  gap: 0.18rem;
  margin: 0.2rem 0 0 1.68rem;
  color: #b4b4b4;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: 0.82rem;
}

.tool-file-list[hidden] {
  display: none;
}

.thread-message[hidden] {
  display: none;
}

.chat-composer {
  width: min(100% - 2rem, 760px);
  margin: auto auto 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 0 0 0.75rem;
}

.composer-input {
  min-width: 0;
  width: 100%;
  min-height: 2.65rem;
  max-height: 8rem;
  resize: none;
  border: 0;
  background: transparent;
  color: #eeeeee;
  outline: 0;
  padding: 0.68rem 0.35rem;
  line-height: 1.45;
}

.composer-input:disabled {
  opacity: 0.72;
}

.run-question {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  margin: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #050505;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.run-question:hover,
.run-question:focus-visible {
  background: #e8e8e8;
  outline: none;
}

.run-question:disabled {
  cursor: progress;
  opacity: 0.28;
}

.send-icon {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
}

.send-icon path {
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 0.7px;
}

.action-icon {
  display: block;
  width: 1.01rem;
  height: 1.01rem;
  flex: 0 0 auto;
}

.message-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  min-height: 1.5rem;
  margin-top: 10px;
  opacity: 0.82;
  transition: opacity 140ms ease;
}

.assistant-message:hover .message-actions,
.assistant-message:focus-within .message-actions {
  opacity: 1;
}

.message-action {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: #b4b4b4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.message-action:hover,
.message-action:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #eeeeee;
  outline: none;
}

.question-meta {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 0.75rem 1rem;
}

.question-meta summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.question-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.question-meta p:first-of-type {
  margin-top: 0.65rem;
}

.manifest-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.manifest-card {
  min-height: 300px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.manifest-card h3 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.manifest-card p {
  color: var(--muted);
  margin: 1rem 0 0;
}

.manifest-card:nth-child(4) p {
  color: rgba(255, 255, 255, 0.84);
}

.card-number {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  border-radius: 4px;
  background: #b23f76;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
}

.manifest-card:nth-child(2) .card-number {
  background: #b23f76;
}

.manifest-card:nth-child(3) .card-number {
  background: #b23f76;
}

.manifest-card:nth-child(4) .card-number {
  background: #b23f76;
  color: white;
}

.tree-block {
  min-height: 340px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #e9e9ec;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.footer-inner p {
  margin: 0;
  color: #6f7278;
}

.footer-inner a,
.footer-link {
  border: 0;
  background: transparent;
  color: #6f7278;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus-visible,
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  outline: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 20;
  transform: translate(-50%, 150%);
  max-width: min(92vw, 520px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    visibility 0s linear 180ms;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    visibility 0s linear 0s;
}

@media (max-width: 980px) {
  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 3rem;
  }

  .page-context-menu {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
  }

  .heading-anchor {
    display: none;
  }

  h1 {
    max-width: 13ch;
  }

  .principle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explorer-layout,
  .validator,
  .install-layout,
  .developer-grid,
  .manifest-layout,
  .install-heading {
    grid-template-columns: 1fr;
  }

  .question-grid {
    grid-template-columns: 1fr;
  }

  .question-chat {
    height: 390px;
  }

  .question-tabs {
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 1fr);
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .install-instruction-panel {
    width: 100%;
  }

  .disclosure-flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    justify-content: center;
    transform: rotate(90deg);
    min-height: 1.25rem;
  }
}

@media (max-width: 1280px) {
  :root {
    --header-action-font-size: 0.9rem;
  }

  .header-inner {
    gap: 1rem;
  }

  .header-actions {
    gap: 0.8rem;
  }

  .nav {
    gap: 0.1rem;
  }

  .nav a {
    padding: 0.42rem 0.5rem;
  }

  .repo-badge-name {
    max-width: 12.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 1180px) {
  .nav a[data-priority="4"] {
    display: none;
  }

  .repo-badge-name {
    max-width: 10.5rem;
  }

  .page-context-copy {
    padding-inline: 0.6rem;
  }
}

@media (max-width: 1100px) {
  .nav a[data-priority="3"] {
    display: none;
  }

  .header-actions {
    gap: 0.65rem;
  }

  .repo-badge-name {
    max-width: 9rem;
  }
}

@media (max-width: 1000px) {
  .nav a[data-priority="2"] {
    display: none;
  }

  .header-actions {
    gap: 0.65rem;
  }

  .repo-badge-name {
    max-width: 9rem;
  }
}

@media (max-width: 850px) {
  .nav a[data-priority="1"] {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
  }

  .nav {
    display: none;
  }

  .header-actions {
    width: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
  }

  .repo-badge {
    min-width: 0;
  }

  .repo-badge-name {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-context-menu::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .header-inner {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.6rem;
  }

  .header-actions {
    grid-template-columns: auto auto;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    margin-left: auto;
  }

  .repo-badge {
    justify-self: auto;
    min-width: 0;
  }

  .page-context-menu {
    justify-self: end;
  }

  .repo-badge {
    min-height: 1.8rem;
  }

  .repo-badge-name,
  .repo-badge-stars {
    display: none;
  }

  .page-context-copy span {
    display: none;
  }

  .page-context-copy {
    width: 2.45rem;
    justify-content: center;
    padding-inline: 0;
  }

  .hero-section,
  .section {
    padding-block: 3rem;
  }

  .folder-grid,
  .principle-grid,
  .metadata-grid,
  .manifest-layout {
    grid-template-columns: 1fr;
  }

  .folder-shell {
    grid-template-rows: var(--folder-header-height) auto;
  }

  .folder-body {
    height: auto;
  }

  .folder-grid {
    position: static;
    height: auto;
    grid-template-rows: none;
    grid-auto-rows: minmax(0, auto);
  }

  .folder-grid span {
    min-height: 4.25rem;
  }

  .folder-tree {
    position: static;
    height: auto;
    min-height: 18rem;
    overflow: auto;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

}
