/* Colors are shared by every panel and control. */
:root {
  color-scheme: light;
  --page: #faf8f4;
  --text: #2f2a24;
  --muted: #6a5e51;
  --faint: #87796b;
  --accent: #775332;
  --panel: #f0e9dd;
  --border: #d6c9b7;
  --block: #e6dccc;
  --hover: #d7cbba;
  --selected: #684c34;
  --on-selected: #fdf9f2;
  --ink-hue: 30;
  --panel-top: 440px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  background: var(--page);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #000000;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --faint: #8c8c8c;
  --accent: #ffffff;
  --panel: #141414;
  --border: #333333;
  --block: #222222;
  --hover: #303030;
  --selected: #eeeeee;
  --on-selected: #111111;
}
:root[data-theme="ink"] {
  --complement: calc(var(--ink-hue) + 180);
  --page: hsl(var(--ink-hue) 72% 85%);
  --panel: hsl(var(--complement) 55% 86%);
  --block: hsl(var(--complement) 50% 78%);
  --hover: hsl(var(--complement) 45% 78%);
  --text: hsl(var(--complement) 60% 12%);
  --muted: hsl(var(--complement) 30% 22%);
  --faint: hsl(var(--complement) 25% 24%);
  --accent: hsl(var(--ink-hue) 65% 12%);
  --border: hsl(var(--complement) 30% 60%);
  --selected: hsl(var(--ink-hue) 65% 20%);
  --on-selected: hsl(var(--ink-hue) 60% 95%);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 5px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.page, .panel-inner { width: min(1056px, calc(100% - 112px)); margin-inline: auto; }
header { display: flex; align-items: center; justify-content: space-between; padding-top: 42px; gap: 24px; }
.wordmark { font-size: 21px; letter-spacing: -.8px; font-weight: 700; text-decoration: none; }
nav { display: flex; gap: 30px; align-items: center; font-size: 14px; }
nav a { text-decoration: none; }
nav button { background: none; border: 0; padding: 10px 0; }
nav a:hover, nav a[aria-expanded="true"], nav button:hover, nav button[aria-expanded="true"] { color: var(--accent); }
main { padding-top: clamp(65px, 11vh, 125px); }
h1 { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: clamp(48px, 6.6vw, 86px); font-weight: 500; letter-spacing: -.065em; line-height: 1.04; }
.stages { display: flex; align-items: center; gap: 20px; margin-top: 40px; width: fit-content; }
.stages button { position: relative; padding: 10px 0; border: 0; background: transparent; font-size: 18px; letter-spacing: -.5px; }
.stages > span { color: var(--faint); }
.stages button::after { content: ""; position: absolute; bottom: 3px; left: 0; right: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.stages button:hover, .stages button[aria-expanded="true"] { color: var(--accent); }
.stages button:hover::after, .stages button[aria-expanded="true"]::after { transform: scaleX(1); }
.panel { position: fixed; inset: var(--panel-top) 0 0; background: var(--panel); border-top: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain; transform: translateY(100%); visibility: hidden; transition: transform 460ms cubic-bezier(.22, 1, .36, 1), visibility 460ms; }
.panel.is-open { transform: translateY(0); visibility: visible; }
.panel-inner { padding-bottom: 48px; }
.panel-bar { display: flex; align-items: center; justify-content: space-between; min-height: 62px; color: var(--muted); font-size: 13px; }
.close { border: 0; background: none; font-size: 27px; font-weight: 300; width: 44px; height: 44px; margin-right: -12px; }
.close:hover { color: var(--text); }
.intro { display: flex; justify-content: space-between; align-items: start; gap: 40px; margin: 8px 0 32px; }
h2 { font: 400 clamp(25px, 3vw, 36px)/1.12 Arial, Helvetica, sans-serif; letter-spacing: -1.3px; margin: 0; }
.intro > p { max-width: 390px; width: 43%; margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.intro.step-intro > p { width: 100%; max-width: 72ch; margin: 0; }
.panel-inner:has(#panel-label:empty) { position: relative; }
.panel-bar:has(#panel-label:empty) { position: absolute; top: 9px; right: 0; min-height: 0; }
.panel-bar:has(#panel-label:empty) ~ [data-content]:not([hidden]) { padding-top: 19px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.example { min-width: 0; border-top: 1px solid var(--border); }
.file-label { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding: 17px 0; font-size: 13px; }
.file-label > span { color: var(--muted); font-size: 12px; }
pre { font: 14px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 14px 0 20px; overflow-x: auto; tab-size: 2; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.choices { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 20px; }
.choices button { background: none; border: 1px solid var(--border); padding: 7px 11px; font-size: 13px; }
.choices button[aria-pressed="true"] { background: var(--selected); color: var(--on-selected); border-color: var(--selected); }
.note { font-size: 12px; line-height: 1.65; color: var(--muted); max-width: 64ch; margin: 9px 0; }
.report-row, .event { display: grid; grid-template-columns: 120px 1fr; gap: 20px; border-top: 1px solid var(--border); padding: 16px 0; font-size: 14px; line-height: 1.7; }
.report-row > span, .event-label { color: var(--muted); }
.report-row p, .event p { margin: 0; }
.report-row code { font-size: 13px; color: var(--accent); overflow-wrap: anywhere; }
.added { display: block; margin-top: 12px; color: var(--accent); font-size: 13px; overflow-wrap: anywhere; }
.install-code { white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-block { position: relative; width: fit-content; max-width: 100%; background: var(--block); color: var(--text); padding: 24px; margin-bottom: 24px; border-radius: 4px; }
.prompt-toolbar { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 4px; }
#copy-status { color: var(--accent); font-size: 12px; background: var(--block); }
#copy-prompt { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); }
#copy-prompt:hover { background: var(--hover); color: var(--text); }
#copy-prompt:focus-visible { outline-color: var(--accent); outline-offset: 2px; }
#copy-prompt .copied-icon, #copy-prompt.is-copied .copy-icon { display: none; }
#copy-prompt.is-copied .copied-icon { display: block; }
.prompt-block .install-code { margin: 0; padding-right: 36px; }
[data-content="install"] .prompt-block { margin-inline: 0; }
.install-lead { margin: 0 0 20px; padding-right: 44px; font-family: Arial, Helvetica, sans-serif; font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; letter-spacing: -.5px; line-height: 1.3; color: var(--text); }
.readme { max-width: 82ch; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.readme h1 { font-size: 36px; letter-spacing: -1.5px; }
.readme h2 { margin: 32px 0 16px; font-size: 26px; }
.readme p { margin: 18px 0; }
.readme pre { padding: 16px; background: var(--block); overflow-wrap: normal; }
.readme :not(pre) > code { font-size: .875em; }
.text-link { font-size: 14px; }
[hidden] { display: none !important; }
@media (max-width: 640px) {
  .page, .panel-inner { width: calc(100% - 40px); }
  header { padding-top: 20px; }
  .wordmark { font-size: 18px; }
  nav { gap: 20px; font-size: 13px; }
  main { padding-top: 65px; }
  h1 { font-size: clamp(40px, 10.5vw, 64px); }
  .stages { gap: 13px; margin-top: 28px; }
  .stages button { font-size: 16px; }
  .panel-bar { min-height: 52px; }
  .panel-bar:has(#panel-label:empty) { top: 4px; }
  .panel-bar:has(#panel-label:empty) ~ [data-content]:not([hidden]) { padding-top: 14px; }
  .intro { display: block; margin-bottom: 24px; }
  .intro > p { width: auto; margin-top: 16px; }
  .columns { grid-template-columns: 1fr; gap: 24px; }
  .report-row, .event { grid-template-columns: 1fr; gap: 7px; }
  .install-code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media (max-height: 650px) {
  header { padding-top: 16px; }
  main { padding-top: 25px; }
  h1 { font-size: clamp(36px, 7vh, 54px); }
  .stages { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

nav .theme {
  position: relative;
  font-size: 20px;
  align-self: center;
  width: 2.3125em;
  height: 1em;
  background: none;
  border: 0;
  padding: 0;
  margin-left: -0.375em;
  color: var(--muted);
  cursor: pointer;
}
.theme:hover { color: var(--text); }
.theme svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme .i-drop {
  width: 0.8125em;
  height: 0.8125em;
  top: 0.125em;
  stroke-width: 1.7;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme:hover .i-drop,
.theme:focus-visible .i-drop { transform: translateX(1.375em); }

.theme .i-system,
.theme .i-light,
.theme .i-dark,
.theme .i-ink {
  opacity: 0;
  transition: opacity 0.18s ease 0.06s;
}
.theme[data-mode="system"]:hover .i-system,
.theme[data-mode="light"]:hover .i-light,
.theme[data-mode="dark"]:hover .i-dark,
.theme[data-mode="ink"]:hover .i-ink,
.theme[data-mode="system"]:focus-visible .i-system,
.theme[data-mode="light"]:focus-visible .i-light,
.theme[data-mode="dark"]:focus-visible .i-dark,
.theme[data-mode="ink"]:focus-visible .i-ink { opacity: 1; }
.theme .i-ink { fill: hsl(var(--ink-hue) 70% 45%); stroke: none; }
@media (prefers-reduced-motion: reduce) {
  .theme .i-drop, .theme svg { transition: none; }
}

@media (max-width: 640px) {
  nav { gap: 14px; }
}
