/* Pico Bay additions to the shared ctrlPi theme. */
.hero { overflow-x: visible; }
body { overflow-x: clip; }
.text-page { max-width: 760px; padding-top: 56px; padding-bottom: 48px; }
/* The guide pages (FAQ, boards, troubleshooting) use the same 960px column as the rest of the site. */
.text-page.wide { max-width: 960px; }
.text-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 24px; }
.text-page h2, .text-page h3 { margin-top: 32px; margin-bottom: 12px; }
.text-page p { color: var(--slate); margin-bottom: 18px; }
.text-page ul { padding-left: 24px; color: var(--slate); }
.text-page li + li { margin-top: 8px; }
.text-page code { overflow-wrap: anywhere; }
.text-page .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 28px; }
.text-page table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.text-page th { text-align: left; padding: 10px 14px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--line); }
.text-page td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--slate); vertical-align: top; }
.text-page tr:last-child td { border-bottom: none; }
.text-page td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.faq-item + .faq-item { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 4px; }
.license-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.9rem/1.7 'JetBrains Mono', monospace; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.i-brand { background: rgba(139,92,246,.12); color: var(--violet); }
.quick-start { }
.quick-start .code-block { margin: 24px 0; }
.quick-start p { color: var(--slate); }
.app-preview { max-width: 860px; margin-top: 48px; }
.app-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.app-preview figcaption { font-size: .88rem; text-align: center; color: var(--slate); }
@media (max-width: 600px) {
  .text-page { padding-top: 32px; }
  .license-text { padding: 18px; font-size: .8rem; }
}
.quick-start .code-block pre { background: #0b1120; color: #e2e8f0; border-radius: 14px; padding: 16px 46px 16px 20px; overflow-x: auto; font: .95rem/1.6 'JetBrains Mono', monospace; }
.quick-start > p + p { margin-top: 16px; }


.gallery-heading { margin-bottom: 14px; }
/* One card: the slides edge to edge, then a white control bar. Each slide is as tall as its own content. */
.gallery-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.screenshot-gallery { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; transition: height .25s ease; }
.screenshot-gallery::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; padding: 0; }
.gallery-frame { position: relative; overflow: hidden; border: 0; border-radius: 0; background: white; }
.files-shot { aspect-ratio: 668 / 379; }
.console-shot { aspect-ratio: 668 / 379; }   /* same height as files-shot: the bottom of the console shot is cut */
.app-preview .gallery-frame img { position: absolute; max-width: none; height: auto; border: 0; border-radius: 0; box-shadow: none; }
.files-shot img { width: 119.91%; left: -10.03%; top: -124.27%; }
.console-shot img { width: 135.08%; left: -17.54%; top: -137.91%; }
.screenshot-gallery:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }

/* Keep cards, screenshots, and reading columns proportionate on wide screens. */
.app-preview figcaption { max-width: 620px; margin: 0 auto; padding: 12px 16px 14px; }

.gallery-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-top: 1px solid var(--line); background: #fff; }
.gallery-pages { display: flex; gap: 6px; }
.gallery-pagination button { min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--blue); font: inherit; font-size: .8rem; cursor: pointer; }
.gallery-pagination button:hover { background: #eef2ff; }
.gallery-pagination .gallery-arrow, #gallery-play { width: 30px; height: 30px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.gallery-page[aria-current="true"] { background: var(--blue); color: white; border-color: var(--blue); }
.gallery-pagination button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (max-width: 640px) {
  .gallery-pagination { gap: 4px; padding: 8px 6px; }
  .gallery-pagination button { min-width: 26px; height: 26px; }
  .gallery-pagination .gallery-arrow, #gallery-play { width: 26px; height: 26px; font-size: .85rem; }
}

/* Long code lines scroll inside their block (the FAQ blocks are not inside .quick-start), so they never widen the page on a phone. */
.code-block { min-width: 0; max-width: 100%; }
.code-block pre { max-width: 100%; overflow-x: auto; }

/* The hero's Online version button: a gradient that drifts across it like a wave. */
.hero .cta-row .btn.online {
  display: inline-flex; align-items: center; gap: 9px;
  color: #fff; border: 0;
  background: linear-gradient(100deg, #2563eb, #06b6d4, #10b981, #8b5cf6, #ec4899, #2563eb);
  background-size: 400% 100%;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.32);
  animation: online-wave 9s linear infinite;
}
.hero .cta-row .btn.online:hover { box-shadow: 0 12px 30px rgba(139, 92, 246, 0.42); animation-duration: 4s; }
.hero .cta-row .btn.online svg { width: 18px; height: 18px; }
@keyframes online-wave { from { background-position: 0% 50%; } to { background-position: 133.33% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero .cta-row .btn.online { animation: none; } }

/* Online, the standout item of the top menu: bold and blue (the other links are grey until hovered) */
.nav a.link.online, .nav a.link.online:visited { color: var(--blue); font-weight: 800; }
.nav a.link.online:hover, .nav a.link.online:focus-visible { color: #1d4ed8; }
.nav a.link.online:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Guides dropdown in the top menu */
/* On a phone the menu hangs from the nav bar itself, so it can never run off the left edge. */
.nav .dd { position: static; }
.nav .dd-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 4px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--slate); transition: color 0.15s; }
.nav .dd-btn:hover, .nav .dd.open .dd-btn { color: var(--blue); }
.nav .dd-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.nav .dd.open .dd-btn svg { transform: rotate(180deg); }
.nav .dd-menu { display: none; position: absolute; top: calc(100% - 2px); right: 12px; min-width: 210px; padding: 6px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift, 0 12px 32px rgba(15, 23, 42, 0.14)); z-index: 60; }
.nav .dd.open .dd-menu { display: block; }
.nav .dd-menu a { display: block; padding: 9px 12px; border-radius: 9px; font-size: 0.9rem; font-weight: 600; color: var(--slate); }
.nav .dd-menu a:hover, .nav .dd-menu a:focus-visible { background: rgba(37, 99, 235, 0.08); color: var(--blue); }
@media (hover: hover) { .nav .dd:hover .dd-menu, .nav .dd:focus-within .dd-menu { display: block; } }
@media (min-width: 761px) { .nav .dd { position: relative; } .nav .dd-menu { left: 0; right: auto; } }

/* Use with Claude page */
.mcp-page section { padding: 28px 0; }
.mcp-page .doc { padding: 0; }
.mcp-page .sec-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; margin-bottom: 14px; text-wrap: balance; }
.mcp-page .sec-head h2 { font-size: clamp(1.4rem, 3.2vw, 1.8rem); }
.mcp-page .card:hover { transform: none; box-shadow: var(--shadow); }
.mcp-page .card h3 { margin-bottom: 4px; }
.mcp-prompts { display: grid; gap: 12px; grid-template-columns: 1fr; }
.mcp-prompts blockquote { margin: 0; padding: 16px 20px; background: var(--card, #fff); border: 1px solid var(--line); border-left: 4px solid var(--rose); border-radius: 14px; color: var(--slate); font-style: italic; }
.tool-list { list-style: none; margin: 6px 0 0; padding: 0; }
.tool-list li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--slate); }
.tool-list li:first-child { border-top: none; }
.tool-list code { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.mcp-note { margin: 18px 0 0; text-align: center; color: var(--slate); font-size: 0.92rem; }

/* Phones: keep the logo on one line and fit the Guides button in the nav bar. */
.logo .mark { white-space: nowrap; }
@media (max-width: 420px) {
  .nav-inner { gap: 8px; padding: 0 12px; }
  .nav .npmb { margin-left: -2px; }
}

/* A table that turns into one block per row on a narrow screen (the supported boards). */
@media (max-width: 600px) {
  .text-page table.stack thead { display: none; }
  .text-page table.stack, .text-page table.stack tbody, .text-page table.stack tr { display: block; }
  .text-page table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .text-page table.stack tr:last-child { border-bottom: none; }
  .text-page table.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .text-page table.stack td::before { content: attr(data-label); flex-shrink: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); text-align: left; }
  .text-page table.stack td:first-child { display: block; padding-bottom: 6px; text-align: left; color: var(--ink); font-weight: 700; }
  .text-page table.stack td:first-child::before { content: none; }
}

/* Room for the copy button, so it never sits on top of a long command. */
.text-page .code-block pre, .mcp-page .code-block pre { padding-right: 46px; }
