body {
  font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4,
.font-heading {
  font-family: 'Onest', sans-serif;
}

/* ===== Searchable country combobox ===== */
.combobox {
  position: relative;
}

.combobox-toggle {
  position: absolute;
  top: 0.5rem; /* matches the input's mt-2 */
  right: 0;
  bottom: 0;
  width: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 0 0.375rem 0.375rem 0;
}

.combobox-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.15s ease;
}

.combobox-toggle[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

/* Pick-one dropdown (Contractors you manage): the trigger is a button styled
   exactly like the country input; the chevron is a plain span, so the button
   itself handles clicks and the arrow just follows its expanded state. */
.combobox-button {
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combobox-button.is-placeholder {
  color: #94a3b8; /* same as placeholder:text-slate-400 on the inputs */
}

/* Focus moves to the list while it is open; keep the trigger looking focused
   so it matches the country input, which stays focused while its list is open. */
.combobox-button[aria-expanded='true'] {
  border-color: #1c7ec4;
  box-shadow: 0 0 0 1px #1c7ec4;
}

.combobox-button[aria-expanded='true'] + .combobox-toggle svg {
  transform: rotate(180deg);
}

/* The listbox takes focus while open; the highlighted option is the focus ring. */
.combobox-list:focus {
  outline: none;
}

.combobox-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.25);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.combobox-list[hidden] {
  display: none;
}

.combobox-option,
.combobox-empty {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #334155;
}

.combobox-option {
  cursor: pointer;
}

.combobox-option.is-active {
  background: #eef6fd;
  color: #1c7ec4;
}

.combobox-option[aria-selected='true'] {
  font-weight: 600;
  color: #1c7ec4;
}

.combobox-empty {
  color: #94a3b8;
  font-style: italic;
  cursor: default;
}

/* Visually hidden live region for screen readers */
.sr-only-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Content pages (Help, Privacy, Terms, User Guide) ===== */
.page-prose h2 {
  margin-top: 2.25rem;
  padding-top: 0.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  color: #0b2942;
  scroll-margin-top: 6rem;
}

.page-prose h2:first-child {
  margin-top: 0;
}

.page-prose h3 {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0b2942;
  scroll-margin-top: 6rem;
}

.page-prose p,
.page-prose li {
  color: #475569;
  line-height: 1.75;
}

.page-prose p {
  margin-top: 0.75rem;
}

.page-prose ul,
.page-prose ol {
  margin-top: 0.75rem;
  padding-left: 1.5rem;
}

.page-prose ul {
  list-style: disc;
}

.page-prose ol {
  list-style: decimal;
}

.page-prose li {
  margin-top: 0.375rem;
}

.page-prose li > ul,
.page-prose li > ol {
  margin-top: 0.5rem;
}

.page-prose strong {
  color: #0f172a;
  font-weight: 600;
}

.page-prose a {
  color: #1c7ec4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-prose a:hover {
  color: #0f5385;
}

.page-prose table {
  width: 100%;
  margin-top: 1.25rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.page-prose th,
.page-prose td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  color: #475569;
}

.page-prose th {
  background: #f8fafc;
  font-weight: 600;
  color: #0b2942;
}

.page-prose code {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: #f1f5f9;
  font-size: 0.875em;
  color: #0f172a;
}

.page-prose .callout {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid #1c7ec4;
  border-radius: 0.5rem;
  background: #eef6fd;
}

.page-prose .callout p {
  margin-top: 0;
  color: #0f3a5f;
}

.page-prose .callout p + p {
  margin-top: 0.5rem;
}

/* Facts the business owner must confirm before publishing */
.page-prose .fill-in {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

/* Sticky in-page table of contents */
.page-toc a {
  display: block;
  padding: 0.375rem 0.75rem;
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  color: #64748b;
}

.page-toc a:hover {
  color: #1c7ec4;
}

.page-toc a.is-current {
  border-left-color: #1c7ec4;
  color: #1c7ec4;
  font-weight: 600;
}

.page-toc a.page-toc-sub {
  padding-left: 1.75rem;
  font-size: 0.8125rem;
}

/* ===== Cookie consent banner ===== */
.cookie-consent-card {
  animation: cookie-rise 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes cookie-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent-card {
    animation: none;
  }
}

/* ===== Menu link for the section in view ===== */
header nav a.is-active {
  color: #1568a8;
}

@media (min-width: 1024px) {
  header nav a.is-active {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 10px;
  }
}

@media (max-width: 1023px) {
  header nav a.is-active {
    background: #eef6fd;
  }
}
