:root {
  --paper: var(--site-paper, #f4f4f4);
  --ink: var(--site-ink, #000);
  --muted: #666;
  --line: #d8d8d8;
  --accent: var(--site-accent, #0000ff);
  --wash: #ececec;
  --button: var(--paper);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 var(--mono); letter-spacing: -.02em; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
.document { max-width: 1180px; margin: 0 auto; padding: 0 34px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 24px 40px; padding-top: 44px; }
.intro-copy { min-width: 0; }
.collection-byline { margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
h1 { font-size: clamp(32px, 4.1vw, 48px); line-height: 1.12; letter-spacing: -.04em; margin: 0 0 20px; }
.intro-tagline { font-size: 15px; line-height: 1.6; color: #2a2a2a; }
.intro-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.intro-mascot { position: relative; align-self: end; justify-self: end; width: 210px; height: 205px; overflow: hidden; pointer-events: none; user-select: none; }
.intro-mascot img { position: absolute; right: -5px; bottom: -18px; width: 220px; height: 220px; max-width: none; transform: scaleX(-1) rotate(-6deg); transform-origin: 50% 90%; }
.solid-link, .solid-button, .client-buttons > a, .client-buttons > button, .copy-config, .sort-tools > button, .dialog-header button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--button); color: var(--ink); border: 1px solid var(--line);
  box-shadow: none;
  padding: 9px 13px; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.solid-link:hover, .solid-button:hover, .client-buttons > a:hover, .client-buttons > button:hover, .copy-config:hover { background: var(--wash); text-decoration: none; }
.solid-link:active, .solid-button:active, .client-buttons > a:active, .client-buttons > button[aria-expanded=true], .copy-config:active {
  background: var(--wash); border-color: var(--line); box-shadow: none;
}
.github-mark { display: block; width: 19px; height: 19px; }
.solid-link { border: 0; padding: 9px 0; }
.solid-link:hover, .solid-link:active { background: transparent; text-decoration: underline; }
.solid-link > span { margin-left: 10px; }
.summary { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.summary > div { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.summary strong { font-size: 15px; font-weight: 400; }
.summary span { color: var(--muted); font-size: 13px; }
.summary .stat-delta { color: #20743a; font-size: 12px; margin-left: 3px; }
.summary .stat-delta[data-direction="flat"] { color: var(--muted); }
.summary .stat-delta[data-direction="down"] { color: #a3342b; }
.section { margin-top: 56px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 12px; }
.section-heading h2 { font-size: 18px; }
.section-heading > span, .section-heading > a { font-size: 12px; color: var(--muted); }
.agent-connect { margin-top: 42px; padding: 24px; border: 1px solid var(--ink); }
.connect-heading { margin-bottom: 14px; }
.connect-heading h2 { font-size: 18px; line-height: 1.4; letter-spacing: -.02em; }
.brand-icon { display: block; object-fit: contain; flex: none; }
.setup-prompt { display: flex; align-items: center; gap: 18px; padding: 18px 18px 18px 20px; background: var(--wash); color: var(--ink); }
.setup-prompt code { flex: 1; min-width: 0; font: 14px/1.65 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
.setup-prompt > button { display: grid; place-items: center; flex: none; width: 42px; height: 42px; background: transparent; color: var(--ink); border: 0; box-shadow: none; }
.setup-prompt > button:hover, .setup-prompt > button:active { background: var(--paper); }
.quick-connect { display: flex; align-items: center; gap: 17px; margin-top: 18px; }
.quick-connect > span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.client-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.client-buttons .brand-icon { width: 21px; height: 21px; }
.client-buttons > a, .client-buttons > button { min-height: 42px; padding: 8px 11px; font-size: 13px; gap: 8px; border: 0; }
.client-buttons > a > span, .client-buttons > button > span { color: #555; margin-left: 2px; }
.client-setup { margin-top: 20px; padding: 18px; background: var(--wash); font-size: 13px; line-height: 1.65; }
.client-setup h3 { margin-bottom: 8px; font-size: 16px; }
.client-setup p { margin-bottom: 12px; }
.client-setup pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--wash); padding: 13px; margin: 12px 0; font: inherit; }
.client-setup code { font: inherit; }
.copy-config { margin: 0 14px 10px 0; padding: 7px 12px; }
.client-note { color: var(--muted); font-size: 12px; margin-top: 10px; }
.mcp-explainer { margin-top: 18px; }
.mcp-explainer summary { display: inline-flex; align-items: baseline; gap: 12px; list-style: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.mcp-explainer summary::-webkit-details-marker { display: none; }
.mcp-explainer summary::after { content: '+'; color: var(--ink); }
.mcp-explainer[open] summary::after { content: '−'; }
.mcp-explainer summary:hover { color: var(--ink); }
.mcp-explainer p { max-width: 68ch; margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.vscode-install { display: inline-block; margin-left: 14px; }
.featured-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.featured-media { display: flex; flex-direction: column; min-width: 0; }
.featured-media video { display: block; width: 100%; height: 330px; object-fit: contain; background: #151515; }
.media-caption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 12px; }
.featured-info { padding: 16px 0; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.featured-info h3 { font-size: 30px; line-height: 1.2; letter-spacing: -.035em; margin-bottom: 8px; }
.byline { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.launch-date { margin-top: 5px; color: var(--ink); font-size: 12px; line-height: 1.5; }
.featured-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.featured-stats strong { display: block; font-size: 25px; font-weight: 400; line-height: 1.3; letter-spacing: -.03em; }
.featured-stats span { color: var(--muted); font-size: 12px; }
.text-link, .video-title { border: 0; background: none; color: var(--accent); padding: 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; font-weight: 400; }
.text-link { align-self: flex-start; font-size: 13px; }
.video-title { text-decoration: none; }
.video-title:hover { text-decoration: underline; }
.desk-selector { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 4px; }
.desk-selector button { background: var(--paper); border: 0; border-bottom: 2px solid transparent; padding: 10px 0; text-align: left; font-size: 13px; }
.desk-selector button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); }
.desk-selector button:hover { background: var(--wash); }
.archive { scroll-margin-top: 95px; }
.filter-bar { display: flex; gap: 12px; padding-bottom: 8px; }
.filter-bar > label { display: flex; align-items: center; min-width: 0; }
.search-label { flex: 1; min-width: 180px; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); }
.search-label > span { font-size: 23px; line-height: 1; }
.search-label input { width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 13px; }
.filter-bar select { width: 190px; max-width: 100%; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.collection-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 16px 0 22px; font-size: 13px; }
.sort-tools { display: flex; align-items: center; gap: 10px; }
.sort-tools label { color: var(--muted); font-size: 12px; }
.sort-tools select { max-width: 190px; background: var(--paper); border: 1px solid var(--line); padding: 6px 8px; font-size: 12px; cursor: pointer; }
.sort-tools > button { padding: 5px 10px; min-height: 32px; font-size: 12px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.video-card { min-width: 0; display: flex; flex-direction: column; }
.thumb { display: block; width: 100%; padding: 0; position: relative; background: #e9e9e9; aspect-ratio: 16/10; overflow: hidden; border: 0; }
.inline-player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #151515; }
.play-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: var(--paper); color: var(--ink); font-size: 15px; cursor: pointer; z-index: 2; }
.timecode, .excerpt-label { position: absolute; padding: 2px 5px; background: #000; color: #fff; font-size: 11px; line-height: 1.4; pointer-events: none; }
.timecode { right: 7px; bottom: 7px; }
.excerpt-label { left: 7px; top: 7px; }
.inline-player.is-playing .inline-play, .inline-player.is-playing .timecode, .inline-player.is-playing .excerpt-label { display: none; }
.card-title-row { margin-top: 14px; }
.video-card h3 { margin-bottom: 5px; font-size: 16px; line-height: 1.4; letter-spacing: -.02em; }
.video-title { font: inherit; }
.card-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.card-metrics strong { display: block; font-size: 19px; font-weight: 400; line-height: 1.25; letter-spacing: -.03em; }
.card-metrics span { color: var(--muted); font-size: 12px; }
.card-metrics .flag-mark { display: inline; font-size: 11px; }
.video-grid.table-view { display: block; overflow-x: auto; }
.index-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
.index-table th { text-align: left; font-size: 12px; font-weight: 400; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--ink); }
.index-table td { padding: 13px 10px; border-bottom: 1px solid var(--line); }
.index-table td:nth-child(n+4), .index-table th:nth-child(n+4) { text-align: right; }
.index-table button { padding: 0; border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-align: left; font-weight: 400; }
.empty, .loading { padding: 34px 0; color: var(--muted); }
.empty button { padding: 0; background: transparent; border: 0; color: var(--accent); text-decoration: underline; margin-top: 12px; }
.source-notes { margin-top: 48px; padding: 20px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.source-notes summary, details summary { cursor: pointer; }
.source-notes p { max-width: 820px; margin: 14px 0; line-height: 1.6; }
.footer { display: flex; justify-content: space-between; gap: 18px; padding: 26px 0 32px; font-size: 12px; color: var(--muted); }
dialog { width: min(1100px, calc(100% - 48px)); max-height: 90vh; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.3); }
.dialog-header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 14px; background: var(--button); border-bottom: 1px solid var(--line); font-size: 13px; }
.dialog-header > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-header > div { display: flex; gap: 8px; flex: none; }
.dialog-header button { padding: 4px 8px; min-height: 30px; font-size: 12px; }
.dialog-main { display: grid; grid-template-columns: 1.6fr 1fr; }
.dialog-left { padding: 20px; min-width: 0; }
.dialog-left video { display: block; width: 100%; max-height: 58vh; object-fit: contain; background: #151515; }
.clip-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12px; }
.dialog-left h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.03em; margin: 20px 0 7px; }
.dialog-tags { color: var(--muted); font-size: 12px; margin-top: 12px; }
.dialog-left h3, .dialog-right h3 { font-size: 15px; font-weight: 400; margin: 25px 0 12px; }
.notes-list { padding-left: 20px; font-size: 14px; line-height: 1.6; }
.notes-list li { margin-bottom: 8px; }
.dialog-left blockquote { margin: 12px 0; padding-left: 14px; border-left: 2px solid var(--line); font-size: 13px; color: var(--muted); white-space: pre-line; }
.dialog-left summary, .dialog-right summary { font-size: 13px; padding: 10px 0; }
.dialog-right { padding: 20px; min-width: 0; }
.dialog-right .stats-heading { margin-top: 0; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
.stat-grid > div { min-width: 0; }
.stat-grid strong { display: block; font-size: 22px; font-weight: 400; line-height: 1.3; letter-spacing: -.03em; }
.stat-grid span { color: var(--muted); font-size: 12px; }
.metric-warning { margin: 15px 0; padding: 10px; border: 1px dashed #a89c81; font-size: 12px; line-height: 1.6; color: #6e5b38; }
.file-details, .brief-details { border-bottom: 1px solid var(--line); margin-top: 16px; }
.metadata-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.metadata-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.metadata-table td:first-child { color: var(--muted); }
.metadata-table td:last-child { text-align: right; }
.brief-text { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--ink); background: #fff; padding: 12px; font-size: 13px; line-height: 1.6; }
.dialog-right .solid-button { width: 100%; margin: 10px 0 16px; }
.video-error { padding: 15px; border: 1px dashed var(--line); font-size: 13px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); padding: 12px 18px; background: #000; color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 80; max-width: calc(100% - 32px); text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.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; }
.skip-link { position: fixed; top: -100px; left: 14px; padding: 10px; background: #000; color: #fff; z-index: 100; }
.skip-link:focus { top: 10px; }
.noscript { padding: 30px; text-align: center; }
@media (max-width: 900px) {
  .intro { grid-template-columns: minmax(0, 1fr) 170px; gap: 24px; }
  .intro-mascot { width: 170px; height: 180px; }
  .intro-mascot img { width: 190px; height: 190px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .search-label { grid-column: 1/-1; }
  .filter-bar select { width: 100%; }
  .featured-layout { grid-template-columns: 1.25fr 1fr; }
  .featured-media video { height: 290px; }
  .featured-info { padding: 12px 0; }
}
@media (max-width: 700px) {
  .document { padding: 0 20px; }
  .intro { grid-template-columns: minmax(0, 1fr) 112px; gap: 24px 18px; padding-top: 28px; }
  .intro-copy { grid-column: 1 / -1; }
  .intro-mascot { grid-column: 2; grid-row: 2; align-self: end; width: 112px; height: 120px; }
  .intro-mascot img { right: -3px; bottom: -10px; width: 128px; height: 128px; }
  h1 { font-size: 34px; line-height: 1.15; }
  .intro-bottom { grid-column: 1; grid-row: 2; align-items: flex-start; flex-direction: column; gap: 12px; }
  .intro-tagline { font-size: 14px; }
  .agent-connect { padding: 18px; }
  .summary { flex-direction: column; gap: 7px; }
  .summary > div { white-space: normal; }
  .summary strong { font-size: 14px; }
  .summary span { font-size: 12px; }
  .connect-heading h2 { font-size: 18px; }
  .setup-prompt { padding: 14px; gap: 10px; }
  .setup-prompt code { font-size: 13px; }
  .setup-prompt > button { width: 38px; height: 38px; }
  .quick-connect { flex-direction: column; align-items: flex-start; gap: 10px; }
  .client-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .client-buttons > a, .client-buttons > button { font-size: 13px; }
  .vscode-install { display: block; margin: 8px 0 0; }
  .featured-layout { grid-template-columns: 1fr; }
  .featured-media video { height: 280px; }
  .featured-info h3 { font-size: 26px; }
  .desk-selector button { padding: 11px 0; font-size: 12px; }
  .collection-toolbar { flex-wrap: wrap; gap: 10px; }
  .sort-tools { width: 100%; justify-content: space-between; }
  .sort-tools select { flex: 1; max-width: none; }
  .sort-tools label { display: none; }
  dialog { width: calc(100% - 20px); max-height: 94vh; }
  .dialog-header { padding: 9px; gap: 8px; }
  .dialog-header > div { gap: 5px; }
  .dialog-header button { font-size: 11px; padding: 4px 6px; }
  .dialog-main { grid-template-columns: 1fr; }
  .dialog-left { border-bottom: 1px solid var(--line); padding: 16px; }
  .dialog-right { padding: 16px; }
  .dialog-left video { max-height: 45vh; }
}
@media (max-width: 540px) {
  .video-grid { grid-template-columns: 1fr; gap: 36px; }
  .video-card h3 { font-size: 17px; }
  .card-metrics strong { font-size: 20px; }
  .media-caption { font-size: 11px; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
