/* Keystroke rendering: boxed key caps like ⌘S */
.keystroke,
kbd {
  display: inline-block;
  padding: 0.05em 0.4em;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #f5f5f5;
  font-family: -apple-system, "Helvetica Neue", sans-serif;
  font-size: 0.9em;
  white-space: nowrap;
}

/* Capo's branded inline colored text */
.capo-orange { color: #E19249; font-weight: 700; }
.capo-purple { color: #9574EE; font-weight: 700; }
.capo-blue   { color: #007AFF; font-weight: 700; }

/* Inline icon sizing to sit on the text baseline */
.inline-icon {
  display: inline-block;
  height: 1em;
  vertical-align: text-bottom;
  margin: 0;
}

/* Platform-specific callouts for the rare case where iOS and macOS
   flows diverge structurally and inline-prose merging would be awkward. */
.platform-note {
  border-left: 3px solid #ccc;
  padding: 0.6em 0.9em;
  margin: 1em 0;
  background: #fafafa;
}
.platform-note.ios-only   { border-left-color: #007AFF; }
.platform-note.mac-only   { border-left-color: #E19249; }
.platform-note::before {
  display: block;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 0.4em;
}
.platform-note.ios-only::before { content: "iOS"; }
.platform-note.mac-only::before { content: "macOS"; }

/* Version banner: shown by _tools/version-banner.js when the page's baked-in
   version is older than the current one. Deliberately quiet — advisory, not an
   error — and styled off .platform-note so it reads as part of the guide. */
.capo-version-banner {
  border-left: 3px solid #E19249;
  background: #fdf6ef;
  padding: 0.7em 1em;
  margin: 0 0 1.5em;
  border-radius: 3px;
  font-size: 0.95em;
}
.capo-version-banner-text {
  margin: 0 0 0.3em;
  color: #4a4a4a;
}
.capo-version-banner-link {
  font-weight: 600;
  text-decoration: none;
}
.capo-version-banner-link:hover { text-decoration: underline; }

/* Version picker in the sidebar, above the chapter list. */
.capo-version-picker {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.6em 0.8em;
  font-size: 0.85em;
}
.capo-version-picker label {
  color: #666;
  margin: 0;
}
.capo-version-picker select {
  flex: 1;
  min-width: 0;
  padding: 0.15em 0.3em;
  font-size: inherit;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
}

/* Grabby lead paragraphs (replaces Middleman's .attention-grabber) */
.attention-grabber {
  font-size: 1.1em;
  font-weight: 500;
  color: #333;
}

figure figcaption {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.4em;
}

/* Cap video figures so they don't blow out wide viewports */
figure:has(> video),
figure:has(> iframe) {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
figure > video {
  width: 100%;
  height: auto;
  display: block;
}

/* Responsive 16:9 wrapper for Vimeo/YouTube embeds */
.video-embed {
  max-width: 720px;
  margin: 1em auto;
  padding: 56.25% 0 0 0;
  position: relative;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
