/* Shared blocks for the home page and keyword landing pages. Relies on base.css tokens. */

.lang-link { display: inline-flex; min-height: 40px; padding: 0 10px; border-radius: var(--radius-sm); align-items: center; color: var(--text-3); font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-decoration: none; transition: color 160ms ease, background 160ms ease; }
.lang-link:hover { color: var(--text-1); background: rgba(255, 255, 255, 0.05); }
.hero h1.hero-title-wide { max-width: 20ch; font-size: clamp(34px, 5.6vw, 76px); }

.lead code, .info-card p code, .path-card > p code, .faq-list code, .entry-copy p code, .fine-print code { padding: 1px 6px; border-radius: 5px; color: var(--text-1); background: var(--bg-3); font-size: 0.86em; overflow-wrap: anywhere; }
.step-list a, .faq-list a, .faq-layout p a, .fine-print a { color: var(--brand-1); }
.footer-bottom a, .footer-brand a[href^="mailto"] { color: var(--text-2); text-decoration: none; }
.footer-bottom a:hover, .footer-brand a[href^="mailto"]:hover { color: var(--text-1); }
.model-jump { margin-top: 32px; justify-content: flex-start; }
a.logo-chip { text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
a.logo-chip:hover { border-color: rgba(38, 220, 236, 0.4); transform: translateY(-1px); }

/* Sub-page hero */
.page-hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--line); isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(55% 60% at 15% 0%, rgba(38, 220, 236, 0.12), transparent 70%); }
.page-hero-grid { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.page-hero-grid.is-single { grid-template-columns: minmax(0, 820px); }
.page-hero h1 { margin: 0; color: var(--text-1); font-size: clamp(34px, 4.6vw, 60px); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
.page-hero .lead { max-width: 640px; margin-top: 20px; }
.page-hero-actions { display: flex; margin-top: 32px; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
.page-hero-meta { margin: 16px 0 0; }
.page-hero-shot { margin: 0; overflow: hidden; padding: 6px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(255, 255, 255, 0.03); box-shadow: var(--shadow-card); }
.page-hero-shot picture, .page-hero-shot img { overflow: hidden; border-radius: 10px; }
.page-hero-shot img { width: 100%; height: auto; }

.breadcrumb { margin: 0 0 28px; padding: 0; color: var(--text-3); font-size: 13px; list-style: none; }
.breadcrumb ol { display: flex; margin: 0; padding: 0; flex-wrap: wrap; list-style: none; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--text-3); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-1); }

/* Dual path cards */
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.path-card { display: flex; padding: clamp(28px, 3.4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); flex-direction: column; background: var(--bg-2); box-shadow: var(--shadow-card); transition: border-color 200ms ease; }
.path-card:hover { border-color: var(--line-strong); }
.path-card.is-featured { border-color: rgba(38, 220, 236, 0.35); background: linear-gradient(180deg, rgba(38, 220, 236, 0.06), transparent 55%), var(--bg-2); }
.path-card .tag { align-self: flex-start; }
.path-card h3 { margin: 18px 0 0; color: var(--text-1); font-size: clamp(22px, 2.2vw, 28px); font-weight: 650; line-height: 1.25; }
.path-card > p { margin: 12px 0 0; color: var(--text-2); }
.path-card .check-list { margin-top: 22px; }
.path-actions { display: flex; margin-top: auto; padding-top: 28px; align-items: center; flex-wrap: wrap; gap: 8px 20px; }

.check-list { display: grid; margin: 0; padding: 0; list-style: none; gap: 10px; }
.check-list li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.check-list li::before { content: ""; position: absolute; top: 0.5em; left: 2px; width: 12px; height: 7px; border-bottom: 2px solid var(--brand-1); border-left: 2px solid var(--brand-1); transform: rotate(-45deg); }
.check-list code { padding: 1px 6px; border-radius: 5px; color: var(--text-1); background: var(--bg-3); font-size: 0.88em; }

/* Value stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); }
.stat strong { display: block; color: var(--text-1); font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat strong small { margin-left: 4px; color: var(--text-3); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.stat b { display: block; margin-top: 14px; color: var(--text-1); font-size: 15px; font-weight: 600; }
.stat p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.fine-print { max-width: 760px; margin: 24px 0 0; color: var(--text-3); font-size: 13px; }
.section-head.is-centered + .stat-grid + .fine-print, .fine-print.is-centered { margin-right: auto; margin-left: auto; text-align: center; }

/* Steps */
.step-list { display: grid; margin: 0; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; gap: 16px; counter-reset: step; }
.step-list li { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); counter-increment: step; }
.step-list li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 18px; color: var(--brand-1); font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; }
.step-list h3 { margin: 0; color: var(--text-1); font-size: 19px; font-weight: 600; line-height: 1.3; }
.step-list p { margin: 10px 0 0; color: var(--text-2); font-size: 15px; }
.step-list code { padding: 1px 6px; border-radius: 5px; color: var(--text-1); background: var(--bg-3); font-size: 0.86em; overflow-wrap: anywhere; }

/* Generic card grid (use cases, benefits) */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); transition: border-color 200ms ease; }
.info-card:hover { border-color: var(--line-strong); }
.info-card > small { color: var(--brand-1); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.info-card h3 { margin: 10px 0 0; color: var(--text-1); font-size: 19px; font-weight: 600; line-height: 1.35; }
.info-card p { margin: 10px 0 0; color: var(--text-2); font-size: 15px; }
.info-card .check-list { margin-top: 16px; }
.info-card .text-action { margin-top: 10px; }

/* Integrations */
.integration-grid { display: grid; margin: 0; padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; gap: 12px; }
.integration-grid a { display: grid; height: 100%; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-md); gap: 4px; color: var(--text-1); background: var(--bg-2); text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
.integration-grid a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.integration-grid b { font-size: 16px; font-weight: 600; }
.integration-grid span { color: var(--text-3); font-size: 13px; line-height: 1.55; }

/* Spec table */
.spec-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); }
.spec-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table thead th { color: var(--text-3); background: var(--bg-1); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.spec-table tbody th { color: var(--text-1); font-weight: 600; white-space: nowrap; }
.spec-table td { color: var(--text-2); }
.spec-table tbody tr:last-child th, .spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table code { color: var(--brand-1); font-size: 13px; white-space: nowrap; }
.spec-table .is-yes { color: var(--ok); }
.spec-table .is-limited { color: var(--warn); }

/* Model detail rows */
.model-detail-list { display: grid; gap: 16px; }
.model-detail { display: grid; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius-lg); align-items: start; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 56px); background: var(--bg-2); scroll-margin-top: 96px; }
.model-detail header { display: flex; align-items: center; gap: 14px; }
.model-detail h2 { margin: 0; color: var(--text-1); font-size: clamp(24px, 2.4vw, 30px); font-weight: 650; line-height: 1.2; }
.model-detail header small { display: block; color: var(--text-3); font-size: 13px; }
.model-detail > div > p { margin: 16px 0 0; color: var(--text-2); }
.model-detail dl { display: grid; margin: 0; gap: 14px; }
.model-detail dl div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.model-detail dl div:last-child { padding-bottom: 0; border-bottom: 0; }
.model-detail dt { color: var(--text-3); font-size: 12px; }
.model-detail dd { margin: 4px 0 0; color: var(--text-1); font-size: 15px; }
.model-detail dd code { margin-right: 6px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--brand-1); background: var(--bg-1); font-size: 13px; }
.model-logo { display: grid; width: 48px; height: 48px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--radius-md); place-items: center; background: var(--bg-1); }
.model-logo img { width: 26px; height: 26px; object-fit: contain; }
.model-logo .logo-invert { filter: invert(1); }

/* Related links */
.related-grid { display: grid; margin: 0; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; gap: 12px; }
.related-grid a { display: block; height: 100%; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--text-1); background: var(--bg-2); text-decoration: none; transition: border-color 160ms ease; }
.related-grid a:hover { border-color: rgba(38, 220, 236, 0.4); }
.related-grid b { display: block; font-size: 16px; font-weight: 600; }
.related-grid span { display: block; margin-top: 6px; color: var(--text-3); font-size: 14px; line-height: 1.55; }

.prose-block { max-width: 760px; }
.prose-block p { margin: 0 0 16px; color: var(--text-2); }
.prose-block strong { color: var(--text-1); }

@media (max-width: 1024px) {
  .stat-grid, .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .lang-link { display: none; }
  .path-grid, .step-list, .card-grid, .card-grid.is-two, .related-grid { grid-template-columns: 1fr; }
  .model-detail { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stat-grid, .integration-grid { grid-template-columns: 1fr; }
  .page-hero-actions { flex-direction: column; align-items: stretch; }
  .page-hero-actions .button { width: 100%; }
  .stat, .step-list li, .info-card { padding: 24px; }
}
