/* TSS Redesign — FAQ (09) v1
 * Bespoke FAQ page: dark search hero, sticky topic sidebar, grouped
 * accordion, closing CTA. Deps: tss-foundation, tss-chrome.
 * No !important; var(--tss-*, #fallback) colour pattern (mirrors tss-about.css).
 */

.tss-faq-page { background: #fff; }
.tss-faq-main { background: #fff; }
.tss-faq-icon { display: block; }

/* ---- shared buttons ---- */
.tss-faq-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 1;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.tss-faq-btn svg { display: block; }
.tss-faq-btn-teal { background: var(--tss-teal, #14B8A6); color: #fff; }
.tss-faq-btn-teal:hover { background: var(--tss-teal-darker, #115E59); color: #fff; }
.tss-faq-btn-orange { background: var(--tss-orange, #F26A3F); color: #fff; }
.tss-faq-btn-orange:hover { background: #DD5A30; color: #fff; }
.tss-faq-btn-dark {
  background: rgba(255,255,255,0.12); color: #fff;
  border-color: rgba(255,255,255,0.22);
}
.tss-faq-btn-dark:hover { background: rgba(255,255,255,0.2); color: #fff; }
/* A mailto:/page link becomes :visited after one click — the parent theme's
 * a:visited rule would otherwise repaint the text and never revert. Re-assert
 * each button's own colours for the visited state. */
.tss-faq-btn-teal:visited   { background: var(--tss-teal, #14B8A6) !important; color: #fff !important; }
.tss-faq-btn-orange:visited { background: var(--tss-orange, #F26A3F) !important; color: #fff !important; }
.tss-faq-btn-dark:visited   {
  background: rgba(255,255,255,0.12) !important; color: #fff !important;
  border-color: rgba(255,255,255,0.22) !important;
}

/* ---- 1. hero ---- */
.tss-faq-hero {
  background: linear-gradient(135deg, #0E2A47 0%, #15445F 55%, #115E59 100%);
  color: #fff; position: relative; overflow: hidden;
}
.tss-faq-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px; opacity: 0.55;
}
.tss-faq-hero-inner {
  position: relative; max-width: 900px; margin: 0 auto;
  padding: 64px 24px 56px; text-align: center;
}
.tss-faq-crumb {
  font-size: 13px; color: rgba(255,255,255,0.75);
  display: flex; gap: 8px; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.tss-faq-crumb a { color: #5EEAD4; text-decoration: none; }
.tss-faq-crumb a:hover { text-decoration: underline; }
.tss-faq-crumb-sep { opacity: 0.5; }
/* Current-page crumb — parent theme may tint [aria-current] spans dark;
 * force a bright white so "FAQ" stays readable on the dark hero. */
.tss-faq-crumb [aria-current="page"] { color: rgba(255,255,255,0.9) !important; }
.tss-faq-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #5EEAD4; margin-bottom: 14px;
}
.tss-faq-hero-h1 {
  margin: 0; font-size: 52px; line-height: 1.05;
  letter-spacing: -0.03em; font-weight: 600; color: #fff;
}
.tss-faq-hero-h1 .tss-serif-i { color: #5EEAD4; }
/* Serif-italic accent word ("answered."). The parent theme sets a
 * more-specific font-family on heading elements that defeats the plain
 * .tss-serif-i class, so it must be forced — same workaround as tss-about.css. */
.tss-faq-page .tss-serif-i {
  font-family: var(--font-serif-i, "Instrument Serif", Georgia, serif) !important;
  font-style: italic !important;
  font-weight: 400 !important;
}
.tss-faq-hero-sub {
  margin: 18px auto 32px; font-size: 17px; line-height: 1.55;
  color: rgba(255,255,255,0.82); max-width: 600px;
}
.tss-faq-search {
  display: flex; align-items: center; gap: 4px;
  background: #fff; border-radius: 12px; padding: 6px;
  max-width: 600px; margin: 0 auto;
  box-shadow: 0 24px 48px -16px rgba(0,0,0,0.35);
}
.tss-faq-search-icon { display: flex; color: var(--tss-mute, #6B7A8C); margin-left: 12px; }
.tss-faq-search-input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--tss-ink, #0E2A47); padding: 12px 10px;
}
.tss-faq-search-input::placeholder { color: var(--tss-mute, #94A3B5); }
.tss-faq-search-clear {
  border: none; background: var(--tss-paper, #F1F5F8);
  color: var(--tss-ink, #0E2A47); font-size: 12px; font-weight: 600;
  padding: 9px 14px; border-radius: 8px; cursor: pointer;
}
.tss-faq-search-clear:hover { background: #E5EBF0; }

/* ---- 2. body grid ---- */
.tss-faq-body {
  max-width: 1280px; margin: 0 auto; padding: 56px 24px 80px;
  display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start;
}
/* Grid items default to min-width:auto, which refuses to shrink below their
 * content's min-content size. On mobile (single 1fr column) that let the
 * column blow out to ~920px — the whole page rendered at desktop width and
 * the FAQ cards were clipped off the right edge. min-width:0 lets the track
 * collapse to the viewport so content wraps instead of overflowing. */
.tss-faq-sidebar, .tss-faq-content { min-width: 0; }

/* ---- 2a. sidebar ---- */
.tss-faq-sidebar-sticky { position: sticky; top: 24px; }
.tss-faq-sidebar-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--tss-mute, #6B7A8C); margin-bottom: 14px;
}
.tss-faq-topics { display: grid; gap: 4px; }
.tss-faq-topic {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--tss-ink, #0E2A47);
  text-decoration: none; background: transparent; transition: background .14s;
}
.tss-faq-topic:hover { background: var(--tss-paper, #F1F5F8); }
.tss-faq-topic.is-active { background: var(--tss-paper, #F1F5F8); }
/* Parent theme tints <a> text — force the design ink on sidebar topics. */
.tss-faq-page .tss-faq-topic,
.tss-faq-page .tss-faq-topic .tss-faq-topic-name { color: var(--tss-ink, #0E2A47) !important; }
.tss-faq-topic-icon {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: var(--tss-teal-soft, #ECFDF8); color: var(--tss-teal-darker, #115E59);
  display: flex; align-items: center; justify-content: center;
}
.tss-faq-topic-name { flex: 1; }
.tss-faq-topic-count { font-size: 11px; color: var(--tss-mute-2, #94A3B5); }
.tss-faq-help-card {
  margin-top: 24px; padding: 18px;
  background: var(--tss-paper, #F1F5F8);
  border: 1px solid var(--tss-line, #E8ECF1); border-radius: 12px;
}
.tss-faq-help-title { font-size: 13px; font-weight: 600; color: var(--tss-ink, #0E2A47); margin-bottom: 4px; }
.tss-faq-help-text { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--tss-mute, #6B7A8C); }
.tss-faq-help-card .tss-faq-btn { width: 100%; justify-content: center; padding: 9px; font-size: 13px; }

/* ---- 2b. accordion ---- */
.tss-faq-group { scroll-margin-top: 88px; margin-bottom: 40px; }
.tss-faq-group:last-of-type { margin-bottom: 0; }
.tss-faq-group[hidden] { display: none; }
.tss-faq-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.tss-faq-group-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: var(--tss-teal-soft, #ECFDF8); color: var(--tss-teal-darker, #115E59);
  display: flex; align-items: center; justify-content: center;
}
.tss-faq-group-title {
  margin: 0; font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--tss-ink, #0E2A47);
}
.tss-faq-group-count { font-size: 12px; font-weight: 500; color: var(--tss-mute, #6B7A8C); }

.tss-faq-items { display: grid; gap: 10px; }
.tss-faq-item {
  border: 1px solid var(--tss-line, #E8ECF1); border-radius: 12px;
  background: #fff; overflow: hidden;
  transition: border-color .15s, background .15s;
}
.tss-faq-item.is-open {
  border-color: var(--tss-teal, #14B8A6);
  background: var(--tss-teal-soft, #ECFDF8);
}
.tss-faq-item.is-hidden { display: none; }
.tss-faq-q-head { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.tss-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 18px 22px; background: transparent; border: none;
  text-align: left; cursor: pointer; font-family: inherit;
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--tss-ink, #0E2A47);
}
.tss-faq-q-text { flex: 1; }
/* Parent theme tints <button> text — force the design ink so question text
 * renders at full navy instead of the washed-out theme grey. */
.tss-faq-page .tss-faq-q,
.tss-faq-page .tss-faq-q-text { color: var(--tss-ink, #0E2A47) !important; }
.tss-faq-q:focus-visible {
  outline: 2px solid var(--tss-teal, #14B8A6);
  outline-offset: -2px; border-radius: 12px;
}
.tss-faq-q-toggle {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--tss-paper, #F1F5F8); color: var(--tss-ink, #0E2A47);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.tss-faq-q-toggle svg { display: block; }
.tss-faq-item.is-open .tss-faq-q-toggle {
  background: var(--tss-teal-deep, #0D9488); color: #fff;
}
.tss-faq-item.is-open .tss-faq-toggle-v { display: none; }

/* Answer panel slides open/closed: .tss-faq-a is a single-row grid whose
 * track animates 0fr <-> 1fr; the inner div clips its overflow during the
 * transition. Without JS (.tss-faq-js absent) it stays a plain visible block. */
.tss-faq-js .tss-faq-a {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows .28s ease;
}
.tss-faq-js .tss-faq-item.is-open .tss-faq-a { grid-template-rows: 1fr; }
/* .tss-faq-a-inner is the grid item — it must carry NO padding so the 0fr
 * track can collapse to a true 0 (padding is not shrinkable). All padding
 * lives on .tss-faq-a-body, which sits inside the clipped item. */
.tss-faq-js .tss-faq-a-inner { min-height: 0; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .tss-faq-js .tss-faq-a { transition: none; }
}
.tss-faq-a-body {
  padding: 0 22px 22px; font-size: 14.5px; line-height: 1.65;
  color: var(--tss-ink-2, #2A3F5A);
}
.tss-faq-a-body a { color: var(--tss-teal-darker, #115E59); text-decoration: underline; }
.tss-faq-a-body a:hover { color: var(--tss-teal, #14B8A6); }
.tss-faq-a-body p { margin: 0 0 10px; }
.tss-faq-a-body p:last-child { margin-bottom: 0; }

.tss-faq-noresults, .tss-faq-empty-static {
  padding: 56px 32px; text-align: center;
  background: var(--tss-paper, #F1F5F8); border-radius: 14px;
}
.tss-faq-noresults-title { font-size: 16px; font-weight: 600; color: var(--tss-ink, #0E2A47); margin-bottom: 6px; }
.tss-faq-noresults-text { margin: 0; font-size: 13.5px; color: var(--tss-mute, #6B7A8C); }

/* ---- 3. CTA ---- */
.tss-faq-cta {
  margin-top: 48px; padding: 32px; border-radius: 16px;
  background: #0E2A47;
  background-image: linear-gradient(135deg, #0E2A47 0%, #0A1F35 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.tss-faq-cta-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #5EEAD4; margin-bottom: 6px;
}
.tss-faq-cta-title {
  margin: 0; font-size: 22px; font-weight: 600;
  letter-spacing: -0.015em; color: #fff;
}
.tss-faq-cta-sub { margin: 6px 0 0; font-size: 13.5px; color: rgba(255,255,255,0.7); }
.tss-faq-cta-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .tss-faq-body { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 64px; }
  .tss-faq-sidebar-sticky { position: static; }
  .tss-faq-topics {
    grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; gap: 8px; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .tss-faq-topic { border: 1px solid var(--tss-line, #E8ECF1); white-space: nowrap; }
  .tss-faq-topic-count { display: none; }
  .tss-faq-help-card { display: none; }
}
@media (max-width: 600px) {
  .tss-faq-hero-inner { padding: 48px 20px 40px; }
  .tss-faq-hero-h1 { font-size: 36px; }
  .tss-faq-hero-sub { font-size: 15px; }
  .tss-faq-group-title { font-size: 19px; }
  .tss-faq-q { padding: 16px; font-size: 14.5px; }
  .tss-faq-a-body { padding: 0 16px 18px; }
  .tss-faq-cta { flex-direction: column; align-items: flex-start; padding: 26px; }
  .tss-faq-cta-actions { width: 100%; }
  .tss-faq-cta-actions .tss-faq-btn { flex: 1; justify-content: center; }
}
