/* Appearly homepage: the palette and type exactly as start.mjs dealt them (white-mint-tiles; instrument-serif, the second pairing, because zilla failed hero-lines), then page CSS
   only inside visuals and for the React form, as references/system.md allows. Kit files live in /tk, unedited. */
:root {
  --p-bg: #ffffff; --p-surface: #f3f3f3; --p-ink: #232323; --p-muted: #686868;
  --p-accent: #a1ffcb; --p-accent-ink: #232323; --p-action: #232323; --p-action-ink: #ffffff;
  --p-inv-bg: #232323; --p-inv-surface: #303030; --p-inv-ink: #ffffff; --p-inv-muted: #a4a4a4;
  --p-inv-accent: #a1ffcb; --p-inv-accent-ink: #232323; --p-inv-action: #a1ffcb; --p-inv-action-ink: #232323;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-text: "Instrument Sans Variable", "Instrument Sans", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.012em;
  --display-tracking-xl: -0.016em;
  --ly-scale: 1.12;
}

/* the client's own mark beside the name */
.nav__logo .kit-mark { width: 22px; height: 22px; color: var(--ink); flex: none; }

/* nav-mega menu card: the real marks of the tools we connect, on the panel */
.menu-card__panel { display: grid; place-items: center; aspect-ratio: 16 / 10; }
.menu-icons { display: flex; gap: var(--s-4); align-items: center; }
.menu-icons img { height: 28px; width: auto; }

/* hero: one assistant window on the surface, the approval card at its lower left */
.hero-chat { display: flex; align-items: flex-start; justify-content: center; padding: var(--s-7) var(--s-7) 0; }
.hero-chat > .ui-chat { width: min(460px, 100%); }
.ui-brand { height: 10px; width: auto; }
@media (max-width: 639px) { .hero-chat { padding: var(--s-5) var(--s-5) 0; } .hero-chat .ui-chat__day { display: none; } }

#services .panel { --p-h: 360px; }
@media (max-width: 639px) { #services .panel { --p-h: 300px; } }
.faq-note { margin-top: var(--s-5); }

/* steps: drawn windows of each stage */
.step-ui { width: min(440px, 100%); margin: auto; }
.step-rows { list-style: none; margin: 0; padding: var(--s-2) var(--s-4) var(--s-4); display: grid; gap: var(--s-2); }
.step-rows li { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.step-rows li span { color: var(--muted); }
.step-rows li b { font-weight: 500; text-align: right; }
.step-text { margin: 0; padding: var(--s-3) var(--s-4) 0; font-size: 14px; }
.step-actions { display: flex; gap: var(--s-2); padding: 0 var(--s-4) var(--s-4); }
.mo-pc__visual { display: grid; place-items: center; background: var(--surface); border-radius: var(--r-lg); padding: var(--s-6); }

/* migration band */
.migration-copy .btn-row { margin-top: var(--s-6); }
.migration-side { display: grid; gap: var(--s-5); align-content: start; }
.clinic-rows { margin: 0; }
.clinic-links { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-5); }
.migration-visual { display: grid; place-items: center; background: var(--surface); border-radius: var(--r-lg); padding: var(--s-6); min-height: 300px; }
.map-ui { width: min(480px, 100%); }
.map-rows { list-style: none; margin: 0; padding: var(--s-2) var(--s-4) var(--s-4); display: grid; }
.map-rows li { display: grid; grid-template-columns: 9.5rem 1.5rem 1fr; align-items: baseline; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.map-from { color: var(--muted); }
.map-arrow { color: var(--muted); }
.map-to { font-weight: 500; }

/* contact: the React form uses the kit's field look; it is not .form, so system.js leaves its submit alone */
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--gutter); }
.contact-form .field--full { grid-column: 1 / -1; }
.contact-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.contact-form legend { padding: 0; margin-bottom: var(--s-2); }
.contact-form .quote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); }
.contact-form .quote-option { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: var(--s-3); align-items: flex-start; border-bottom: 1px solid var(--line); padding: var(--s-2) 0; cursor: pointer; font-weight: 400; min-height: 44px; }
.contact-form .quote-option:has(input:checked) { border-color: var(--ink); }
.contact-form .quote-option input { accent-color: var(--ink); margin-top: 3px; width: 16px; height: 16px; flex: none; }
.contact-form .quote-option__name { display: block; font-weight: 500; font-size: 14px; }
.contact-form .quote-option__price { display: block; font-size: 13px; color: var(--muted); }
.hidden-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quote-panel { margin-top: var(--s-7); padding: var(--s-6); background: var(--surface); border-radius: var(--r-lg); display: grid; gap: var(--s-3); }
.quote-panel__head { font: var(--display-weight) var(--t-h3)/1.25 var(--font-display); margin: 0; }
.sent-note { padding: var(--s-6); background: var(--surface); border-radius: var(--r-lg); }
@media (max-width: 639px) { .contact-form, .contact-form .quote-grid { grid-template-columns: minmax(0, 1fr); } .contact-form > * { grid-column: 1 / -1; } }

.footer__fine { flex-basis: 100%; max-width: 110ch; }
@media (min-width: 1024px) {
  .footer__col--two ul { columns: 2; column-gap: var(--s-5); }
  .footer__col--two li { break-inside: avoid; }
}
.contact-form textarea { min-height: 56px; }

.faq-visual { margin-bottom: var(--s-5); display: grid; place-items: center; background: var(--surface); border-radius: var(--r-lg); padding: var(--s-5); }
.access-ui, .price-ui { width: min(400px, 100%); }
#questions .faq-visual { margin: var(--s-5) 0 0; }
.migration-visual { background: var(--p-surface); }
@media (min-width: 1024px) { .migration-visual { min-height: 480px; } }
.access-ui .ui-head { gap: var(--s-2); }
@media (max-width: 639px) {
  .map-rows li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .map-arrow { display: none; }
  .map-ui .ui-head, .step-ui .ui-head { flex-wrap: wrap; }
  .map-ui .ui-meta { display: none; }
  .faq-visual { padding: var(--s-3); }
}

/* the app's shadcn tokens share three names with the kit (--muted, --accent, --card): on this page the kit's win */
:root:root { --muted: var(--p-muted); --accent: var(--p-accent); --accent-ink: var(--p-accent-ink); --card: var(--p-surface); }
@media (max-width: 639px) {
  .mo-pc__visual { padding: var(--s-4); }
  #questions .faq-visual { margin-top: var(--s-4); }
  .access-ui .step-rows li:nth-child(2) { display: none; }
}
.contact-form .quote-option { background: none; border-radius: 0; font-size: 14px; }
.tool-icons { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.tool-icons img { height: 28px; width: auto; display: block; }
/* a phone: a stacked section is at most 1.5 screens, or a full two (check.mjs frames the second screen) */
@media (max-width: 639px) {
  #how .mo-pc__step:nth-child(3) .mo-pc__visual { display: none; }
  .map-rows li:nth-child(2), .map-rows li:nth-child(4) { display: none; }
  .clinic-rows .rows__name { display: none; }
  .migration-visual { padding: var(--s-3); }
}

/* ---- QA fixes, 2026-11-13 ---- */
/* Sections grow with their content at every width. The kit fixed each section at exactly one or two
   screen heights from 1280px up, so on a short laptop screen (1280x720) a section ran over the next
   one and the closing "Start a conversation" band sat on top of the footer links. */
main > :is(section, .section):not(.hero, .section--hero, .is-live), footer.closing { height: auto; min-height: 0; }
@media (min-width: 640px) {
  :where(main > :is(section, .section):not(.hero, .section--hero, .is-live), footer.closing) { display: flex; flex-direction: column; }
  main > :is(section, .section):not(.hero, .section--hero, .is-live) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}
main > :is(section, .section).g2 > :is(.wrap, .container), main > :is(section, .section).g2m > :is(.wrap, .container) { row-gap: var(--s-8); grid-template-rows: auto auto; }
footer.closing > .wrap { grid-template-rows: auto auto; }
/* the pinned "How it works" stage: the section stays a block, so its sticky stage keeps one screen's
   height and pins (as a flex column the stage grew to the section's two screens and never stuck) */
main > [data-moment="pinned-chapters"].is-live { display: block; }

/* the contact form's options: rows with a hairline under each, not the app's boxed cards */
.contact-form .quote-option { border-width: 0 0 1px; box-shadow: none; }

/* the clinic dates: name over date below 1280px, so the date never squeezes into a narrow column */
@media (max-width: 1279px) {
  .clinic-rows li { grid-template-columns: minmax(0, 1fr); }
  .clinic-rows .rows__value { grid-column: 1; grid-row: auto; text-align: left; white-space: normal; max-width: none; }
}
@media (max-width: 639px) { .clinic-rows .rows__name { display: block; } }

/* below 1024px (stacked hero): the assistant window shows whole, the approval card under it instead of
   over the answer, and the hero grows to hold them rather than cropping the window at the fold */
@media (max-width: 1023px) {
  main > .hero.hero--split { height: auto; min-height: 100vh; min-height: 100svh; }
  .hero--split > .wrap { height: auto; }
  .hero--split .hero__media.hero-chat { flex: none; height: auto; flex-direction: column; align-items: center; gap: var(--s-4); padding-bottom: var(--s-5); }
  .hero-chat .ly-float { position: static; width: min(460px, 100%); }
  /* the four service cards one per row, so the drawn windows are not cut off at the card's right edge */
  #services .grid > .span-6 { grid-column: 1 / -1; }
  /* the footer's link columns full width, so long labels are not squeezed into a quarter column */
  .closing__links .footer__col { grid-column: 1 / -1; }
}
/* the skill pack's "Check" note sits under the report's lines instead of over the words it points at */
#services .ui-doc__note { top: 168px !important; right: auto; left: 140px; }
@media (max-width: 639px) { #services .ui-doc__note { display: none; } }
/* the drawn chat's placeholder line meets 4.5:1 on its grey field (axe color-contrast) */
.ui-chat__ph { color: #666; }

/* hero kicker: the triage link sits after the deadline line, same size, underlined */
.hero__kicker { align-items: flex-start; }
.hero__kicker .dot { margin-top: 0.5lh; transform: translateY(-50%); }
.hero__kicker-link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }
.hero__kicker-link:hover { text-decoration-color: var(--accent); }

/* migration band: the $750 Stripe button under the links */
.migration-pay { margin-top: var(--s-6); max-width: 46ch; }
.migration-pay .btn { display: inline-flex; align-items: center; gap: var(--s-2); }
.migration-pay__note { color: var(--muted); }
