/* FAQ page (2026-10). Tokens, page colours, fonts, buttons, nav and footer come from brand.css.
   Same language as the homepage: one ground, Bebas Neue display type, and diagonal hairline
   fields cut into stepped outlines. Questions are <details> so the page works without JS;
   js/faq.js adds the search, deep links and the active-topic highlight. */
body.cs-page {
  /* the sticky site nav's height; js/faq.js measures the real one */
  --cs-nav-h: 94px;
  --hi: var(--cs-yellow);
  --field: rgba(255, 255, 255, .06);
}

[data-theme="light"] body.cs-page {
  --hi: var(--cs-purple);
  --field: #fff;
}

/* ---- Title and search ---- */
.cs-faq-hero {
  position: relative;
  padding: clamp(48px, 7vw, 104px) var(--cs-gutter) clamp(48px, 6vw, 80px);
}

/* a stepped hairline field in the top right, like the homepage's chain section */
.cs-faq-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: min(44vw, 560px);
  height: 100%;
  background: var(--hatch-white);
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 72% 100%, 72% 62%, 54% 62%, 54% 28%, 40% 28%);
  pointer-events: none;
}

.cs-faq-hero-inner {
  position: relative;
  max-width: var(--cs-max);
  margin: 0 auto;
}

.cs-faq-title {
  margin: 0 0 20px;
  font-family: var(--cs-display);
  font-size: clamp(64px, 9vw, 136px);
  font-weight: 400;
  line-height: .86;
  letter-spacing: .01em;
}

.cs-faq-title span {
  color: var(--hi);
}

.cs-faq-lede {
  max-width: 40ch;
  margin: 0 0 36px;
  color: var(--cs-text-soft);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
}

.cs-faq-search {
  position: relative;
  max-width: 640px;
}

.cs-faq-search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--cs-text-soft);
  pointer-events: none;
}

.cs-faq-search input {
  width: 100%;
  min-height: 60px;
  padding: 0 18px 0 54px;
  border: 2px solid var(--cs-text);
  border-radius: 0;
  background-color: var(--field);
  box-shadow: 5px 5px 0 var(--cs-purple);
  color: var(--cs-text);
  font: 500 18px/1.2 var(--cs-body);
  -webkit-appearance: none;
  appearance: none;
}

.cs-faq-search input::placeholder {
  color: var(--cs-text-soft);
  opacity: .7;
}

.cs-faq-search input:focus {
  outline: 3px solid var(--cs-teal);
  outline-offset: 4px;
}

.cs-faq-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  max-height: min(60vh, 480px);
  overflow-y: auto;
  border: 2px solid var(--cs-text);
  background-color: var(--cs-page);
  box-shadow: 5px 5px 0 var(--cs-purple);
}

.cs-faq-results[hidden] {
  display: none;
}

.cs-faq-opt {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid var(--cs-rule);
  cursor: pointer;
}

.cs-faq-opt:first-child {
  border-top: 0;
}

.cs-faq-opt[aria-selected="true"] {
  background-color: var(--cs-rule);
  box-shadow: inset 4px 0 0 var(--cs-teal);
}

.cs-faq-opt-q {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.cs-faq-opt-cat {
  display: block;
  margin-top: 4px;
  color: var(--cs-text-soft);
  font-family: var(--cs-display);
  font-size: 15px;
  letter-spacing: .05em;
}

.cs-faq-opt mark {
  background: none;
  color: inherit;
  text-decoration: underline 2px var(--cs-teal);
  text-underline-offset: 3px;
}

.cs-faq-none {
  margin: 0;
  padding: 14px 16px;
  color: var(--cs-text-soft);
  font-size: 15px;
}

.cs-faq-none a {
  color: var(--cs-link);
}

/* ---- Topics beside the questions ---- */
.cs-faq-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0 clamp(40px, 6vw, 96px);
  max-width: var(--cs-max);
  margin: 0 auto;
  padding: 0 var(--cs-gutter) clamp(72px, 9vw, 128px);
}

.cs-faq-nav {
  position: sticky;
  top: calc(var(--cs-nav-h) + 32px);
  align-self: start;
}

.cs-faq-nav-title {
  margin: 0 0 14px;
  color: var(--cs-link);
  font-family: var(--cs-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .05em;
}

.cs-faq-nav ul {
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--cs-rule);
  list-style: none;
}

.cs-faq-nav a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  border-left: 3px solid transparent;
  color: var(--cs-text-soft);
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
}

.cs-faq-nav a:hover {
  color: var(--cs-text);
}

.cs-faq-nav a[aria-current="true"] {
  border-left-color: var(--cs-teal);
  color: var(--cs-text);
  font-weight: 600;
}

.cs-faq-nav a:focus-visible {
  outline: 3px solid var(--cs-teal);
  outline-offset: 2px;
}

/* ---- Topics and questions ---- */
.cs-faq-cat {
  padding-top: clamp(40px, 5vw, 64px);
  scroll-margin-top: calc(var(--cs-nav-h) + 8px);
}

.cs-faq-cat:first-child {
  padding-top: 0;
}

.cs-faq-bars {
  display: block;
  width: 38px;
  height: 30px;
  margin-bottom: 16px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 15px);
}

.cs-faq-cat-title {
  margin: 0 0 18px;
  font-family: var(--cs-display);
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: .01em;
}

.cs-faq-q {
  border-top: 1px solid var(--cs-rule);
  scroll-margin-top: calc(var(--cs-nav-h) + 24px);
}

.cs-faq-q:last-child {
  border-bottom: 1px solid var(--cs-rule);
}

.cs-faq-q summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}

.cs-faq-q summary::-webkit-details-marker {
  display: none;
}

.cs-faq-q summary:focus-visible {
  outline: 3px solid var(--cs-teal);
  outline-offset: 4px;
}

.cs-faq-q h3 {
  margin: 0;
  font-size: clamp(17px, 1.4vw, 19px);
  font-weight: 600;
  line-height: 1.4;
}

.cs-faq-q summary:hover h3 {
  text-decoration: underline 1px var(--cs-rule);
  text-underline-offset: 4px;
}

/* plus that turns into a minus; the topic's accent colour */
.cs-faq-mark {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.cs-faq-mark::before,
.cs-faq-mark::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 18px;
  height: 3px;
  background-color: var(--accent);
  transition: transform .2s ease;
}

.cs-faq-mark::after {
  transform: rotate(90deg);
}

.cs-faq-q[open] .cs-faq-mark::after {
  transform: rotate(0deg);
}

.cs-faq-a {
  max-width: 68ch;
  padding: 0 0 24px;
  color: var(--cs-text-soft);
  font-size: 16px;
  line-height: 1.6;
}

.cs-faq-a > :first-child {
  margin-top: 0;
}

.cs-faq-a > :last-child {
  margin-bottom: 0;
}

.cs-faq-a p,
.cs-faq-a ul,
.cs-faq-a ol {
  margin: 0 0 14px;
}

.cs-faq-a ul,
.cs-faq-a ol {
  padding-left: 22px;
}

.cs-faq-a li + li,
.cs-faq-a li > ul {
  margin-top: 6px;
}

.cs-faq-a li > ul {
  margin-bottom: 0;
}

.cs-faq-a strong {
  color: var(--cs-text);
  font-weight: 600;
}

.cs-faq-a a,
.cs-faq-more a {
  color: var(--cs-link);
  text-underline-offset: 3px;
}

.cs-faq-a code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
}

.cs-faq-table {
  overflow-x: auto;
  margin: 0 0 14px;
}

.cs-faq-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.cs-faq-table th,
.cs-faq-table td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--cs-rule);
  text-align: left;
  vertical-align: top;
}

.cs-faq-table th {
  border-bottom: 2px solid var(--accent);
  color: var(--cs-text);
  font-family: var(--cs-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .04em;
}

/* a question reached from search or a link flashes its accent once */
.cs-faq-flash summary {
  animation: cs-faq-flash 1.6s ease-out;
}

@keyframes cs-faq-flash {
  from {
    box-shadow: inset 4px 0 0 var(--accent);
    padding-left: 14px;
  }

  to {
    box-shadow: inset 0 0 0 var(--accent);
    padding-left: 0;
  }
}

/* ---- Closing note ---- */
.cs-faq-more {
  position: relative;
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: 52px;
}

.cs-faq-more::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(320px, 70%);
  height: 28px;
  background: var(--hatch-white);
  clip-path: polygon(0 0, 100% 0, 100% 50%, 40% 50%, 40% 100%, 0 100%);
}

.cs-faq-more h2 {
  margin: 0 0 10px;
  font-family: var(--cs-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  line-height: 1;
}

.cs-faq-more p {
  margin: 0;
  color: var(--cs-text-soft);
  font-size: 17px;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .cs-faq-mark::before,
  .cs-faq-mark::after {
    transition: none;
  }

  .cs-faq-flash summary {
    animation: none;
  }
}

/* ---- Tablet and phone: the topics become a sticky row of chips under the site nav ---- */
@media screen and (max-width: 991px) {
  .cs-faq-body {
    display: block;
  }

  .cs-faq-nav {
    top: var(--cs-nav-h);
    z-index: 20;
    margin: 0 calc(-1 * var(--cs-gutter)) 32px;
    padding: 12px 0;
    border-bottom: 1px solid var(--cs-rule);
    background-color: var(--cs-page);
  }

  .cs-faq-nav-title {
    display: none;
  }

  .cs-faq-nav ul {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 var(--cs-gutter);
    border-left: 0;
    scrollbar-width: none;
  }

  .cs-faq-nav ul::-webkit-scrollbar {
    display: none;
  }

  .cs-faq-nav a {
    margin: 0;
    padding: 8px 14px;
    border: 1.5px solid var(--cs-rule);
    font-size: 14px;
    white-space: nowrap;
  }

  .cs-faq-nav a[aria-current="true"] {
    border-color: var(--cs-teal);
    box-shadow: inset 0 -3px 0 var(--cs-teal);
  }

  /* the chip row adds to the sticky stack */
  .cs-faq-cat {
    scroll-margin-top: calc(var(--cs-nav-h) + 72px);
  }

  .cs-faq-q {
    scroll-margin-top: calc(var(--cs-nav-h) + 80px);
  }

  /* kept above the intro line */
  .cs-faq-hero::before {
    width: 46vw;
    height: clamp(150px, 30vw, 260px);
  }
}

@media screen and (max-width: 559px) {
  .cs-faq-search input {
    font-size: 16px;
  }
}
