/* Shared presentation, loaded after page styles. */
body { font-family: "Inter", sans-serif; font-size: 1.125rem; line-height: 1.6; }
button, input, select, textarea, summary,
.primary-action, .primary-link, .secondary-action { font-family: inherit; font-size: 1rem; }
/* Legacy field rules use font:inherit; keep form controls at the shared size. */
button, input, select, textarea { font-size: 1rem !important; }
code, pre, kbd, samp { font-family: inherit; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea,
.panel, .start-panel, .customer-path, .agreement-card, .vehicle-row,
.repair-activity-item, .empty-vehicles, .offer-decision, .offer-review-gate,
.offer-primary-progression { border-radius: 16px; }
/* brandguide: Buttons use rounded-lg corners and semibold type. */
button:not(.restart-link), .primary-action, .primary-link, .secondary-action {
  border-radius: 8px;
  font-weight: 600;
}
.primary-link { background: var(--red); }
.primary-link:hover { background: var(--red-dark); }
.primary-action, .primary-link, .secondary-action { line-height: 1.5; }
a.primary-action, a.secondary-action {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.start-hero, .customer-start-intro, .empty-vehicles { text-align: left; }
.customer-start-intro, .empty-vehicles { margin-left: 0; margin-right: 0; }
.start-hero > *, .customer-start-intro > * { margin-left: 0; }
body:has(.application-header-inner) .customer-start .customer-start-intro,
body:has(.application-header-inner) .customer-start .customer-paths,
.vehicle-main .empty-vehicles { max-width: none; margin-inline: 0; }
body:has(.application-header-inner) .customer-start .customer-start-intro > p:last-child,
body:has(.application-header-inner) .customer-start .customer-path p,
.vehicle-main .empty-vehicles > p { max-width: 65ch; }
input[type="date"], input[type="file"], select, textarea {
  min-height: 44px; padding: 10px 12px; border: 1px solid var(--line);
  color: var(--ink); background: var(--surface); max-width: 100%;
}
/* Keep the native filename on its own line when browser text grows. The
   chooser remains native, keyboard accessible, and at least 44px high. */
input[type="file"] { width: 100%; min-width: 0; height: auto; }
.certification-flow { grid-template-columns: minmax(0, 1fr); }
input[type="file"]::file-selector-button {
  display: block; max-width: 100%; white-space: normal; margin-bottom: 0.5em;
  min-height: 44px; margin-right: 0; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); background: var(--wash); font: inherit; font-weight: 600;
}
.agreement-status, .repair-status, .test-badge, .required-group-status,
.status-pill { font-size: 0.875rem; font-weight: 800; border-radius: 999px; padding: 5px 10px; }
.field-validation { margin: 6px 0 0; font-size: 0.875rem; color: var(--red-dark); }
[aria-invalid="true"] { border-color: var(--red); }
a[href^="https://boompay.ca/contact"] { color: var(--link-blue); }
.agreement-card-actions .primary-link {
  --action-hierarchy-level: secondary;
  background: var(--surface); color: var(--link-blue); border: 1px solid var(--line);
}
.agreement-card-actions .primary-link:hover {
  background: var(--surface); border-color: var(--link-blue);
}
/* Content links use the guide's normal-text blue on cards and slate-50 wash.
   Navigation state, brand marks and button actions retain their own roles. */
main :where(a[href]:not(.primary-action, .primary-link, .secondary-action, [role="button"])) {
  color: var(--link-blue);
}
main :is(p, dd, li, h2, h3, label, small) a[href]:not(nav a):not(.repair-document-list a):not(.primary-action):not(.secondary-action):not(.primary-link),
main .document-list a,
main .document-links a,
main .agreement-title,
main .agreement-more-actions a,
main .agreement-card > details a,
main .repair-activity-heading > a,
main .breadcrumb a[href],
main .recovery-note a[href],
main .restart-link,
.action-link:not(.primary-action):not(.secondary-action) {
  color: var(--link-blue);
  text-decoration: underline;
  text-underline-offset: .18em;
}

/* Shared header anatomy for public navigation and the signed-in application. */
.topbar { position: static; min-height: calc(44px + 2rem); border-bottom-color: #e2e8f0; }
.topbar .topbar-inner {
  position: relative;
  flex-flow: row wrap;
  align-items: center;
  gap: 12px;
  padding-block: 1rem;
  min-height: calc(44px + 2rem);
}
.topbar .brand {
  flex: 1 1 8rem;
  min-width: 44px;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.topbar .application-header-inner .brand { flex-basis: auto; }
.topbar .brand picture { display: flex; flex: 0 0 auto; }
.topbar .brand-logo { display: block; width: 40px; height: 40px; border-radius: 8px; }
.topbar .brand-copy { min-width: 0; }
.topbar .brand strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.125;
  letter-spacing: -0.025em;
}
@media (min-width: 640px) {
  .topbar .brand strong { font-size: 1.125rem; }
}
.topbar .primary-navigation {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  max-width: 100%;
  gap: 8px;
  margin-left: auto;
  font-size: 1rem;
}
.public-navigation .navigation-menu { position: static; max-width: 100%; }
.topbar .public-navigation a,
.topbar .public-navigation .navigation-menu > summary,
.topbar .header-menu-toggle,
.topbar .header-menu .navigation-dropdown :is(a, summary) {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--link-blue);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.topbar .primary-navigation :is(a:hover, a[aria-current="page"], summary:hover) {
  background: #f1f5f9;
}
.topbar .primary-navigation a[aria-current="page"] { color: var(--ink); }
.topbar :is(a, summary, button):focus-visible { outline-offset: 2px; }
.topbar .public-navigation .navigation-menu > summary,
.topbar .header-menu-toggle {
  justify-content: center;
  gap: 8px;
  padding-inline: 8px;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.topbar :is(.public-navigation summary, .header-menu-toggle)::-webkit-details-marker { display: none; }
.topbar .public-navigation .navigation-dropdown,
.topbar .header-menu > .navigation-dropdown {
  position: absolute;
  top: calc(100% - .5rem);
  right: var(--page-gutter);
  left: auto;
  z-index: 50;
  width: min(20rem, calc(100% - 2 * var(--page-gutter)));
  max-width: none;
  max-height: 60vh;
  padding: 8px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px #12203320;
}
.topbar .public-navigation .navigation-dropdown a { display: flex; }
.topbar .header-menu > .navigation-dropdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  text-align: left;
}
.topbar .header-menu:not([open]) > .navigation-dropdown { display: none; }
.topbar .header-menu .navigation-dropdown :is(a, summary) { display: flex; }
.topbar .header-menu .account-menu > div {
  position: static;
  width: 100%;
  max-width: 100%;
  box-shadow: none;
}
.topbar .account-menu > div > span { font-size: 1rem; }
.topbar .sign-out {
  min-width: 44px;
  padding: 0 12px;
  color: #334155;
  border-color: #cbd5e1;
  line-height: 1.25;
}
.topbar .sign-out:hover { background: var(--wash); }
.public-nav-separator { width: 1px; height: 32px; background: #e2e8f0; }
.public-menu-audience { display: none; }
.topbar .public-navigation .public-application {
  color: #fff;
  background: #c8201e;
  justify-content: center;
  text-align: center;
}
.topbar .public-navigation .public-application:hover { color: #fff; background: #a81c1e; }
@media (width < 768px) {
  .topbar .public-navigation > .public-audience { display: none; }
  .public-menu-audience {
    display: block;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
    padding-bottom: 4px;
  }
}
