/* Landing template v2 (pilot: youtube-transcript-api, 25 Nov 2026).
   One shared file so every landing page that adopts the template looks the same; per-page inline
   styles keep only what is truly page-specific. Existing tokens only; no tinted callout boxes
   (the thin-left-rule .lp-note is the one note style). */

/* ── Hero: words left, request + response right ─────────────────────────── */
.lp-hero.lp2-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 3rem 2rem 3.5rem; text-align: left; background: none; }
.lp-hero.lp2-hero .hero-brand-logo { margin: 0 0 1rem; height: 44px; }
.lp-hero.lp2-hero h1 { font-size: 3rem; line-height: 1.12; margin-bottom: 1rem; }
.lp-hero.lp2-hero .subtitle { margin: 0 0 1.25rem; max-width: 34rem; font-size: 1.15rem; }
.lp2-price { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; margin: 0 0 1.75rem; }
.lp2-price strong { color: var(--text-primary); font-weight: 700; }
.lp2-br { display: inline; }      /* one price per line at every width */
.lp-hero.lp2-hero .hero-btns { justify-content: flex-start; }
.lp2-hero-links { margin-top: 1.25rem; color: var(--text-muted); font-size: 0.9rem; }
.lp2-hero-links a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; }
.lp2-hero-links a:hover { color: var(--accent); }
.code-section.lp2-hero-code { margin: 0; }
.lp2-hero-code .code-body pre { font-size: 0.8rem; line-height: 1.65; }

/* ── In-page menu ──────────────────────────────────────────────────────── */
.lp2-nav { position: sticky; top: var(--lp2-nav-top, 64px); z-index: 50; display: flex; justify-content: center; gap: 0.25rem;
  overflow-x: auto; scrollbar-width: none; background: var(--bg-primary); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 0 1rem; }
.lp2-nav::-webkit-scrollbar { display: none; }
.lp2-nav a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem;
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.lp2-nav a:hover, .lp2-nav a:focus-visible { color: var(--accent); }
#try, #pricing, #compare, #official, #quickstart, #fields, #faq { scroll-margin-top: calc(var(--lp2-nav-top, 64px) + 56px); }

/* ── Price card beside the billing note, comparison directly below ───────── */
.lp2-price-grid { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 1.5rem; max-width: 1100px; margin: 0 auto; align-items: stretch; }
.lp2-price-grid .lp-note { margin: 0; max-width: none; align-self: start; }
.lp2-billing p { margin: 0; }
.lp2-subtitle { max-width: 1100px; margin: 3.5rem auto 0.5rem; font-size: 1.5rem; font-weight: 800; text-align: left; }
.lp2-subdesc { max-width: 1100px; margin: 0 auto; color: var(--text-secondary); line-height: 1.7; }
#pricing .lp-table-wrap, #pricing .lp-table-cap { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* Fold-away detail: one tap away, still in the HTML for search engines and screen readers. */
.lp2-more { max-width: 1100px; margin: 1rem auto 0; }
.lp2-more > summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; gap: 0.5rem;
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; list-style: none; }
.lp2-more > summary::-webkit-details-marker { display: none; }
.lp2-more > summary::before { content: '+'; color: var(--accent); font-size: 1.1rem; font-weight: 700; width: 1rem; }
.lp2-more[open] > summary::before { content: '\2212'; }
.lp2-more > summary:hover { color: var(--accent); }
.lp2-more .lp-src { margin-top: 0.25rem; }

/* ── Official API comparison ──────────────────────────────────────────── */
.lp2-official { max-width: 1100px; margin: 0 auto; }
.lp2-official .comparison-table { margin: 0; }
.lp2-official tbody th { text-align: left; color: var(--text-primary); font-weight: 600; font-size: 0.9rem;
  text-transform: none; letter-spacing: 0; background: none; white-space: nowrap; }
.lp2-official td:last-child { color: var(--text-primary); font-weight: 600; }
.lp-src.lp2-center-src { margin-left: auto; margin-right: auto; }

/* ── Code: tabs, one response ─────────────────────────────────────────── */
.lp2-code { max-width: 1100px; margin: 0 auto; }
.lp2-tablist { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.lp2-tablist::-webkit-scrollbar { display: none; }
.lp2-tablist [role="tab"] { flex: 0 0 auto; min-height: 44px; padding: 0 1rem; background: none; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-secondary); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.lp2-tablist [role="tab"][aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--accent); }
.lp2-tablist [role="tab"]:hover { color: var(--accent); }
.lp2-tablist [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lp2-code:not(.lp2-js) .lp2-tablist { display: none; }   /* without JS every panel shows, stacked */
.lp2-code .code-section { margin: 0 0 1rem; }
.lp2-code .code-body { max-height: 26rem; overflow: auto; }
.lp2-code .lp-src { margin-top: 0.5rem; }

/* ── Parameter and field tables: two columns on desktop, stacked rows on phones ─ */
.lp2-spec { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 1100px; margin: 0 auto; align-items: start; }
.lp2-spec-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.lp2-spec-table caption { text-align: left; font-weight: 700; font-size: 1rem; padding: 0 0 0.75rem; color: var(--text-primary); }
.lp2-spec-table thead th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary);
  background: var(--bg-secondary); padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.lp2-spec-table tbody th, .lp2-spec-table td { text-align: left; vertical-align: top; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; line-height: 1.6; }
.lp2-spec-table tbody tr:last-child th, .lp2-spec-table tbody tr:last-child td { border-bottom: 0; }
.lp2-spec-table tbody th { font-weight: 600; width: 38%; color: var(--text-primary); overflow-wrap: anywhere; }
.lp2-spec-table td { color: var(--text-secondary); }
.lp2-spec-table code { font-family: 'Monaco', 'Menlo', monospace; font-size: 0.85em; }
#fields .lp-note { max-width: 1100px; }

/* ── One related block ───────────────────────────────────────────────── */
.lp2-guides { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.25rem 1.5rem; margin: 2rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--border); }
.lp2-guides li { padding: 0.15rem 0; font-size: 0.9rem; line-height: 1.5; color: var(--text-secondary); }
.lp2-guides a { display: inline-block; padding: 0.65rem 0 0.1rem; color: var(--text-primary); font-weight: 600; }
.lp2-guides a:hover { color: var(--accent); }
.lp2-guides span { display: block; }

@media (max-width: 1023px) {
  .lp-hero.lp2-hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 2rem 1.25rem 2.5rem; }
  .lp2-spec { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .lp-hero.lp2-hero h1 { font-size: 2.1rem; }
  .lp-hero.lp2-hero .subtitle { font-size: 1.05rem; }
  .lp2-dot { display: none; }
  .lp2-br { display: inline; }
  .lp-hero.lp2-hero .hero-btns .btn { flex: 1 1 0; justify-content: center; padding-left: 1rem; padding-right: 1rem; }
  .lp2-hero-code .code-body { max-height: 15rem; overflow: auto; }
  .lp2-nav { justify-content: flex-start; padding: 0 0.5rem; }
  .lp2-price-grid { grid-template-columns: minmax(0, 1fr); }
  .lp2-subtitle { font-size: 1.3rem; margin-top: 2.5rem; }
  .lp2-code .code-body { max-height: 22rem; }
  /* Stacked rows: name above description, no sideways scroll */
  .lp2-spec-table thead { display: none; }
  .lp2-spec-table, .lp2-spec-table tbody, .lp2-spec-table tr, .lp2-spec-table tbody th, .lp2-spec-table td { display: block; width: 100%; min-width: 0; }
  .lp2-spec-table tbody th { padding-bottom: 0.15rem; border-bottom: 0; }
  .lp2-spec-table td { padding-top: 0; }
  .lp2-official .comparison-table { min-width: 680px; }
  .lp2-guides { grid-template-columns: minmax(0, 1fr); }
}

/* ── Additions after the first pilot render ─────────────────────────── */
:root { --lp2-nav-top: 93px; }                 /* height of the fixed site navbar */
.lp2-seg { white-space: nowrap; }
.lp2-dot { display: none; }
.lp2-tested { margin-top: 1.5rem; }
.lp2-tested .lp2-tested-h { color: var(--text-primary); font-weight: 700; margin: 0 0 0.35rem; }
.lp2-code .lp2-tested + .lp-src { margin-top: 0.75rem; }

@media (max-width: 768px) {
  :root { --lp2-nav-top: 69px; }
  /* Related posts as compact rows: small picture beside the title */
  .lp2-related .blog-related-grid { gap: 0.75rem; }
  .lp2-related .blog-related-card { flex-direction: row; align-items: center; }
  .lp2-related .blog-related-thumb { flex: 0 0 104px; width: 104px; height: 72px; }
  .lp2-related .blog-related-content { padding: 0.75rem 1rem; gap: 0.25rem; }
  .lp2-related .blog-related-content p, .lp2-related .blog-related-content .blog-category { display: none; }
  .lp2-related .blog-related-content h3 { font-size: 0.95rem; }
}
.lp2-collapsed .lp2-extra { display: none; }
.lp2-show-all { display: block; margin: 0.75rem auto 0; min-height: 44px; padding: 0 1.25rem; background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-light, var(--border)); border-radius: 10px; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.lp2-show-all:hover { border-color: var(--accent); color: var(--accent); }
.lp2-show-all[hidden] { display: none; }
.lp2-inline { margin: 0.5rem 0 0; }
.lp2-inline p { margin-top: 0.25rem; font-size: 0.9rem; }
@media (max-width: 768px) {
  body .lp-section { padding-top: 3rem; padding-bottom: 3rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  body .lp-section .section-desc { margin-bottom: 2rem; }
}
@media (max-width: 768px) {
  /* The try box sits right under the hero and the full code follows, so the phone hero stays words + buttons. */
  .code-section.lp2-hero-code { display: none; }
}
.lp2-visible-src { max-width: 1100px; margin: 0.75rem auto 0; }
#pricing .lp2-extra td:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── Fixes after ui-designer round 1 (25 Nov) ───────────────────────── */
.lp2-nowrap { white-space: nowrap; font-family: 'Monaco', 'Menlo', monospace; font-size: 0.85em; }
@media (min-width: 1024px) and (max-width: 1199px) {
  .lp-hero.lp2-hero .lp2-hero-code .code-body pre { font-size: 0.7rem; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .lp-hero.lp2-hero h1 { font-size: 2.5rem; }
}
@media (max-width: 768px) {
  /* mobile.css sets overflow-x:hidden on html/body, which makes body a scroll box and stops position:sticky.
     clip keeps the no-sideways-scroll guarantee without that side effect (browsers without clip keep hidden). */
  html, body { overflow-x: clip; }
  .lp2-nav a { padding: 0 0.6rem; }
  .lp2-related .blog-related-grid { grid-template-columns: minmax(0, 1fr); }
  /* Spec tables: the title sits above the box, the box is the body */
  .lp2-spec-table { border: 0; background: none; border-radius: 0; overflow: visible; }
  .lp2-spec-table caption { display: block; width: auto; padding: 0 0 0.75rem; }
  .lp2-spec-table tbody { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); overflow: hidden; }
  /* Official comparison: one card per row, each answer labelled, nothing off-screen */
  #official .lp-table-wrap table.comparison-table { display: block; min-width: 0; width: 100%; }
  #official .comparison-table thead { display: none; }
  #official .comparison-table tbody, #official .comparison-table tr { display: block; width: 100%; min-width: 0; }
  #official .comparison-table tr { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); margin-bottom: 0.75rem; padding: 0.25rem 0; }
  #official .comparison-table tbody th, #official .comparison-table td { display: block; border: 0; padding: 0.4rem 1rem; white-space: normal; }
  #official .comparison-table tbody th { font-size: 1rem; padding-top: 0.75rem; }
  #official .comparison-table td::before { content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 0.1rem; }
  #official .comparison-table tr:hover td { background: none; }
}
@media (max-width: 768px) { .lp2-guides a { padding: 0.8rem 0 0.5rem; } }

/* ── Rollout batch A/B (25 Nov): wide spec tables, balanced headings, left-aligned logo rows in the two-column hero ─ */
.lp2-spec > .lp2-spec-wide { grid-column: 1 / -1; }
.lp-hero.lp2-hero h1, .lp-section h2, .cta-section h2, .lp2-subtitle { text-wrap: balance; }
.lp2-hero .hero-brand-logos { justify-content: flex-start; }
.lp-note strong, .lp-callout strong { color: var(--text-primary); }
@media (min-width: 1024px) { .lp2-products .data-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .lp2-products .data-grid { grid-template-columns: minmax(0, 1fr); } }
.lp2-products .data-card { display: flex; flex-direction: column; }
.lp2-products .data-card > p:last-child { margin-top: auto; padding-top: 0.75rem; }
@media (min-width: 1024px) and (max-width: 1099px) { .lp-hero.lp2-hero .lp2-hero-code .code-body pre { font-size: 0.65rem; } }
@media (min-width: 769px) and (max-width: 1023px) { .lp2-related .blog-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { section.cta-section h2 { font-size: 1.9rem; } }
