/* ==========================================================================
   bintelbot — the marketing pages (pages/content/*.mjs, built by scripts/build-pages.mjs).

   Loaded after styles.css and built only from its tokens: the same colours, the seven type sizes, the radius scale
   and the 4-based spacing. Reading pages sit on the ground like the homepage's sections, divided by hairlines, with
   one measure for prose and the full width for tables.
   ========================================================================== */

.page { padding-block: var(--s6) var(--section); }
.page > * { max-width: 760px; }
.page > .pg-section--wide, .page > .tbl, .page > .pg-section:has(> .tbl) { max-width: none; }

/* Breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s6); padding: 0; list-style: none; font-size: var(--t-small); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--line-strong); }
.crumbs a { color: var(--body); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--ink); }

/* Head: H1, byline, disclosure, check line, intro, calls to action */
.page__head { padding-bottom: var(--s7); border-bottom: 1px solid var(--hair); }
.page__title { margin: 0; font-size: var(--t-h2); font-weight: 500; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.byline { margin: var(--s4) 0 0; font-size: var(--t-small); color: var(--muted); }
.byline a { color: var(--body); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.disclosure, .checkline { margin: var(--s4) 0 0; font-size: var(--t-small); line-height: 1.6; color: var(--muted); }
.disclosure { padding: var(--s4); border-radius: var(--r-lg); background: var(--fill); box-shadow: inset 0 0 0 1px var(--hair); }
.page__head > p:not([class]), .page__lead { margin: var(--s5) 0 0; font-size: var(--t-lead); line-height: 1.6; color: var(--body); }

.cta { margin-top: var(--s6); }
.cta__row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.cta__note { margin: var(--s3) 0 0; font-size: var(--t-small); color: var(--muted); }

/* Prose sections */
.pg-section { padding-block: var(--s7); border-bottom: 1px solid var(--hair); }
.pg-section:last-child { border-bottom: 0; }
.pg-section h2 { margin: 0 0 var(--s5); font-size: var(--t-h3); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.pg-section h3 { margin: var(--s6) 0 var(--s3); font-size: var(--t-lead); font-weight: 500; line-height: 1.4; color: var(--ink); }
.pg-section p, .pg-section li { color: var(--body); line-height: 1.7; }
.pg-section p { margin: 0 0 var(--s4); }
.pg-section ul, .pg-section ol { margin: 0 0 var(--s4); padding-left: 1.25em; }
.pg-section li { margin-bottom: var(--s2); }
.pg-section li::marker { color: var(--lime); }
.pg-section strong { color: var(--ink); font-weight: 500; }
.page a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime-ring); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.page a:not(.btn):hover { text-decoration-color: var(--lime); }

/* Illustrative scenario (PRD §4.5) */
.scenario { margin: var(--s5) 0; padding: var(--s5); border-radius: var(--r-lg); background: var(--fill); box-shadow: inset 0 0 0 1px var(--hair); }
.scenario__label { margin: 0 0 var(--s3) !important; font-size: var(--t-micro); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) !important; }
.scenario p:last-child { margin-bottom: 0; }

/* Tables: a real table, scrolling inside its own box at phone width with the first column sticky (PRD §4.11) */
.tbl { position: relative; margin: var(--s5) 0; overflow-x: auto; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--hair); }
.tbl:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.tbl table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: var(--t-small); line-height: 1.5; }
.tbl caption { padding: var(--s3) var(--s4); text-align: left; font-size: var(--t-micro); line-height: 1.5; color: var(--muted); caption-side: bottom; }
.tbl th, .tbl td { padding: var(--s3) var(--s4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
.tbl thead th { position: sticky; top: 0; background: var(--surface); color: var(--ink); font-weight: 500; white-space: nowrap; }
.tbl td { color: var(--body); }
.tbl tbody th { position: sticky; left: 0; z-index: 1; min-width: 9rem; background: var(--ground); color: var(--ink); font-weight: 500; box-shadow: 1px 0 0 var(--hair); }
.tbl thead th:first-child { left: 0; z-index: 2; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl__note { margin: calc(-1 * var(--s2)) 0 var(--s5) !important; font-size: var(--t-micro) !important; color: var(--muted) !important; }

/* Sample-run captures */
.pg-shot { margin: var(--s5) 0; }
.pg-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--hair); }
.pg-shot figcaption { margin-top: var(--s2); font-size: var(--t-micro); color: var(--muted); }

/* FAQ: every answer visible */
.faq-list .faq-item { padding-block: var(--s4); border-top: 1px solid var(--hair); }
.faq-list .faq-item h3 { margin: 0 0 var(--s2); font-size: var(--t-body); font-weight: 500; color: var(--ink); }
.faq-list .faq-item p { margin: 0; }

/* Closing call to action and sources */
.closing { border-bottom: 1px solid var(--hair); }
.sources ul { padding-left: 0; list-style: none; font-size: var(--t-small); }
.sources li { color: var(--muted); }

/* Forms on the marketing pages (the /demo form): the homepage's fields, plus a select */
.pg-form { margin-top: var(--s6); padding: var(--s6); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--surface), var(--bg)); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .95), inset 0 0 0 1px var(--hair); }
.pg-form__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.field select { width: 100%; min-height: 48px; padding: var(--s3) var(--s4); border: 0; border-radius: var(--r-lg); background: var(--ground); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; font-size: var(--t-body); appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.field select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--lime), 0 0 0 4px var(--lime-ring); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--danger), 0 0 0 4px var(--danger-soft); }
.pg-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s5); }
.pg-form__status { margin: 0; font-size: var(--t-small); color: var(--body); }
.pg-form__status.is-error { color: var(--danger); }
.pg-form__done { margin-top: var(--s6); padding: var(--s6); border-radius: var(--r-lg); background: var(--lime-soft); box-shadow: inset 0 0 0 1px var(--lime-ring); }
.pg-form__done h2 { margin: 0 0 var(--s2); font-size: var(--t-h3); font-weight: 500; }
.pg-form__done p { margin: 0; color: var(--body); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .pg-form { padding: var(--s5); }
  .pg-form__fields { grid-template-columns: minmax(0, 1fr); }
  .cta__row .btn { flex: 1 1 100%; }
}
