/* The help centre's styles, after the look of boappa.se: dark header, heavy headlines, beige bands, green arrows. */

@font-face {
  font-family: "DM Sans";
  src: url("/static/fonts/DMSans.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* the Latin part of Montserrat, as Google Fonts cuts it: other letters fall back to DM Sans */
@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Montserrat", var(--font-sans);

  --green: #3e8148;
  --green-dark: #295531;
  --green-tint: #d8e6da;
  --surface: #ffffff;
  --surface-warm: #f8f6f1;
  --surface-dark: #2a2a2a;
  --surface-footer: #2c2713;
  --ink: #262626;
  --ink-secondary: #5c5c5c;
  --link: #3563c1;
  --link-hover: #284e97;
  --border: #cccccc;
  --border-row: #d9d9d9;
  --border-warm: #d9cbb0;
  --border-on-dark: #ffffff33;
  --focus-ring: 0 0 0 2px #ffffff, 0 0 0 4px #3563c1;
  --radius: 5px;
  --size-content: 1320px;
  --gutter: clamp(20px, 4vw, 60px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  background: var(--surface);
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--ink);
}

a:hover {
  color: var(--green);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1.15;
  font-weight: 800;
  overflow-wrap: break-word;
  hyphens: auto;
}

.display {
  max-width: 640px;
  font-size: clamp(36px, 4.1vw, 58px);
  line-height: 1.2;
  font-weight: 900;
}

.eyebrow {
  margin: 0;
  font-size: 18px;
  line-height: 27px;
  font-weight: 700;
}

.eyebrow--caps {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.muted {
  color: var(--ink-secondary);
}

.lead {
  margin: 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 30px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--ink);
  color: #ffffff;
}

.button--light {
  border-color: #ffffff;
  background: none;
  color: #ffffff;
}

.button--light:hover {
  background: #ffffff;
  color: var(--ink);
}

.tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--green-tint);
  color: var(--ink);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.arrow-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.arrow-links a {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 17px;
  line-height: 24px;
  text-decoration: none;
}

.arrow-links svg {
  flex: none;
  margin-top: 3px;
  color: var(--green);
}

.row-arrow {
  flex: none;
  display: flex;
  margin-top: 2px;
  color: var(--green);
}

.row-arrow svg {
  width: 24px;
  height: 24px;
}

/* header */

.site-header {
  min-height: 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 20px var(--gutter);
  background: var(--surface-dark);
  color: #ffffff;
  font-size: 18px;
  line-height: 27px;
}

.site-header a:not(.button) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
}

.site-header a:not(.button):hover,
.site-header__categories a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.site-header a.site-header__home {
  gap: 16px;
  font-weight: 600;
  text-decoration: none;
}

.site-header__divider {
  width: 1px;
  height: 28px;
  background: #ffffff66;
}

.site-header__categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
}

/* the search field and the site's links wrap as one group, to the right */
.site-header__tools {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
}

.site-header__search {
  width: 220px;
}

.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

/* the menu's buttons show only on small screens, where the menu is a popover */
.site-header__menu-button {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff66;
  border-radius: var(--radius);
  background: none;
  color: #ffffff;
  cursor: pointer;
}

.site-header__menu-button:hover {
  border-color: #ffffff;
}

.site-header__menu-button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* on wide screens the menu's links sit in the header's own row */
.site-header__menu {
  display: contents;
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding-block: 16px;
  }

  .site-header__menu-button {
    display: inline-flex;
  }

  .site-header__menu:not(:popover-open) {
    display: none;
  }

  /* the open menu covers the screen, its close button where the menu button was */
  .site-header__menu:popover-open {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px var(--gutter) 40px;
    border: 0;
    background: var(--surface-dark);
    color: #ffffff;
    font-size: 20px;
    line-height: 28px;
    overflow-y: auto;
  }

  .site-header__menu-close {
    align-self: flex-end;
  }

  .site-header__categories {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header__categories a:not(.button) {
    min-height: 56px;
    border-bottom: 1px solid var(--border-on-dark);
  }

  .site-header__tools {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .site-header__search {
    width: 100%;
  }

  .site-header__nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-header__nav .button {
    margin-top: 16px;
    justify-content: center;
  }
}

body:has(.site-header__menu:popover-open) {
  overflow: hidden;
}

/* search */

.search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.search input {
  flex: 1 1 200px;
  min-width: 0;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5c5c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")
    no-repeat 14px center / 20px;
  appearance: none;
}

.search--large input {
  flex-basis: 320px;
  height: 56px;
  padding-left: 52px;
  font-size: 18px;
  background-position: 18px center;
}

.search input:focus-visible {
  border-color: var(--link);
}

.search button {
  flex: none;
  height: 56px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.search button:hover {
  background: #404040;
}

/* front page */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #ffffff;
}

.hero__photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 64%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* fades the photo into the dark behind the text */
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #262626 36%, #2626268c 62%, #26262633 100%);
}

@media (max-width: 800px) {
  .hero__photo {
    width: 100%;
  }

  .hero__shade {
    background: #262626b3;
  }
}

.hero__inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 88px var(--gutter) 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__search {
  max-width: 640px;
  margin-top: 8px;
}

.hero .search input {
  border-color: #ffffff;
}

.hero .search button {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
}

.hero .search button:hover {
  background: var(--surface-warm);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.15;
  font-weight: 800;
}

.category-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 24px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.category-card__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.category-card__icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: var(--green-tint);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.category-card h3 {
  margin: 0;
  font-size: 23px;
  line-height: 30px;
  font-weight: 600;
}

.category-card h3 a {
  text-decoration: none;
}

.category-card .arrow-links {
  padding-top: 16px;
  border-top: 1px solid var(--border-warm);
}

.category-card .button {
  margin-top: auto;
  align-self: flex-start;
  background: none;
}

.category-card .button:hover {
  background: var(--ink);
}

/* page frame */

.page {
  padding: 56px var(--gutter) 96px;
}

.page--front {
  padding-top: 80px;
}

.page__inner {
  max-width: var(--size-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page--narrow {
  padding-top: 88px;
}

.page--narrow .page__inner {
  max-width: 680px;
  gap: 24px;
}

.home-link {
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.title-band {
  background: var(--surface-warm);
  padding: 32px var(--gutter) 56px;
}

.title-band__inner {
  max-width: var(--size-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.title-band p {
  margin: 0;
}

.title-band--guide h1 {
  max-width: 22ch;
  font-size: clamp(24px, 3.6vw, 48px);
}

.title-band .search {
  max-width: 720px;
  margin-top: 16px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
}

.breadcrumbs a,
.breadcrumbs [aria-current] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.breadcrumbs [aria-current] {
  color: var(--ink-secondary);
}

/* category page */

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill-nav .button {
  min-height: 44px;
  padding: 8px 16px;
}

.page__inner--list > * {
  width: 100%;
  max-width: 920px;
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-row);
}

.guide-list li {
  border-top: 1px solid var(--border-row);
}

.guide-list a {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 4px;
  text-decoration: none;
}

.guide-list__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-list__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.subcategory h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.25;
  font-weight: 600;
  /* the pills above jump here */
  scroll-margin-top: 24px;
}

.subcategory h2 a {
  text-decoration: none;
}

/* guide page */

.page__inner.guide-layout {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 48px 80px;
  align-items: flex-start;
}

.related {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.related h2 {
  margin: 0 0 8px;
  font-size: 23px;
  line-height: 30px;
  font-weight: 600;
}

.guide-body {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 30px;
}

.guide-body > * {
  margin: 0 0 24px;
}

.guide-body > :last-child {
  margin-bottom: 0;
}

.guide-body a {
  color: var(--link);
}

.guide-body a:hover {
  color: var(--link-hover);
}

.guide-body h2 {
  margin-top: 40px;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
}

.guide-body h3 {
  font-size: 23px;
  line-height: 30px;
  font-weight: 600;
}

.guide-body ol,
.guide-body ul {
  padding-left: 28px;
}

.guide-body li + li {
  margin-top: 10px;
}

.guide-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.guide-body table {
  border-collapse: collapse;
}

.guide-body th,
.guide-body td {
  padding: 8px 12px;
  border: 1px solid var(--border-row);
  text-align: left;
}

.guide-body blockquote {
  padding-left: 16px;
  border-left: 4px solid var(--border-warm);
}

/* platform blocks: tabs with JavaScript, headings without */

.platform-tabs {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.platform-tabs__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-tabs__bar button {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
}

.platform-tabs__bar button[aria-selected="true"] {
  background: var(--ink);
  color: #ffffff;
}

.platform-block > * {
  margin: 0 0 24px;
}

.platform-block > :last-child {
  margin-bottom: 0;
}

.platform-block__heading {
  font-size: 20px;
  line-height: 28px;
}

/* search page */

.search-results {
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-results > p {
  margin: 0;
  font-size: 18px;
  line-height: 30px;
}

.search-results__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-row);
}

.search-results__list li {
  border-top: 1px solid var(--border-row);
}

.search-results__list a {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 4px;
  text-decoration: none;
}

.search-results__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.search-results__title {
  font-size: 22px;
  line-height: 30px;
  font-weight: 600;
}

/* footer */

.contact {
  background: var(--surface-warm);
  padding: 80px var(--gutter);
}

.contact__inner {
  max-width: var(--size-content);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  align-items: flex-start;
}

.contact__intro {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact__intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.2;
  font-weight: 800;
}

.contact__intro p:not(.eyebrow) {
  margin: 0;
  max-width: 44ch;
  font-size: 18px;
  line-height: 30px;
}

.contact__cards {
  flex: 2 1 520px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

.contact__card {
  display: flex;
  gap: 20px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact__card > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact__card a {
  font-size: clamp(18px, 4.8vw, 22px);
  line-height: 30px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact__icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: var(--green-tint);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact__label {
  font-weight: 700;
}

.contact__note {
  color: var(--ink-secondary);
}

.site-footer__bar {
  background: var(--surface-footer);
  color: #ffffff;
  padding: 72px var(--gutter) 40px;
}

.site-footer__inner {
  max-width: var(--size-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.site-footer__logo {
  width: min(263px, 70%);
  height: auto;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-on-dark);
  font-size: 18px;
  line-height: 27px;
}

.site-footer__row p {
  flex: 1 1 320px;
  margin: 0;
  max-width: 420px;
}

.site-footer__row nav {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.site-footer__row a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
}

.site-footer__row a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.site-footer__legal {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-on-dark);
}
