/* Backdur Help Centre — white, quiet and readable. Hairlines instead of heavy shadows,
   left-aligned text, the brand violet kept for links, focus and the odd accent. */

@font-face {
  font-family: "Valley Sans";
  src: url("fonts/ValleySans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --surface: #F7F6F4;      /* quiet warm grey for cards and the hero */
  --surface-2: #F1EFEC;
  --line: #ECE9E5;
  --line-strong: #DEDAD5;
  --text: #1C1A19;
  --text-2: #5F5A55;
  --muted: #8A847E;
  --primary: #5B2D86;
  --primary-soft: #F1EBF7;
  --ink: #1C1A19;
  --display: "Valley Sans", "Inter", system-ui, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pop: 0 1px 2px rgba(28, 26, 25, 0.04), 0 12px 32px -8px rgba(28, 26, 25, 0.14);
  --gutter: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }

.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--text-2); }

/* ---------- Header ---------- */

.top { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; text-decoration: none; }
.logo img { width: auto; height: 22px; }
.logo__help { font-size: 15px; font-weight: 500; color: var(--text-2); }
.top__nav { display: flex; align-items: center; gap: 20px; }
.top__link { display: none; align-items: center; min-height: 44px; color: var(--text-2); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.top__link:hover { color: var(--text); }
.top__cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity 150ms var(--ease); }
.top__cta:hover { opacity: 0.86; }
@media (min-width: 640px) { .top__link { display: inline-flex; } }

/* Header search (inner pages): its own row on phones, in the bar on wider screens */
.search--top { order: 3; flex: 1 0 100%; margin-bottom: 12px; }
@media (min-width: 900px) {
  .search--top { order: 0; flex: 0 1 420px; margin: 0; }
}

/* ---------- Search ---------- */

.search { position: relative; display: flex; align-items: center; width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.search:hover { border-color: #CFCAC4; }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 45, 134, 0.12); }
.search__icon { position: absolute; left: 14px; width: 18px; height: 18px; pointer-events: none; }
.search__icon svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search__input { flex: 1; min-width: 0; height: 44px; padding: 0 12px 0 42px; border: 0; background: transparent; border-radius: 12px; font-size: 16px; }
.search__input:focus { outline: none; }
.search__input::placeholder { color: var(--muted); }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__kbd { display: none; margin-right: 10px; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 6px; font: 500 12px/1.5 var(--sans); color: var(--muted); }
@media (hover: hover) and (min-width: 900px) { .search__kbd { display: inline-block; } }
.search--hero { max-width: 520px; border-radius: 14px; }
.search--hero .search__input { height: 54px; padding-left: 46px; font-size: 16.5px; }
.search--hero .search__icon { left: 16px; }
.search--page { margin-top: 20px; }

.suggest { position: absolute; z-index: 45; top: calc(100% + 6px); left: 0; right: 0; max-height: min(70vh, 460px); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: var(--pop); text-align: left; }
.suggest__label { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.suggest__opt { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 44px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.suggest__opt:hover, .suggest__opt.is-active { background: var(--surface); }
.suggest__title { font-size: 15px; font-weight: 550; line-height: 1.35; }
.suggest__cat { font-size: 13px; color: var(--muted); }
.suggest__q { font-size: 15px; line-height: 1.35; }
.suggest__all { font-size: 14.5px; font-weight: 550; color: var(--primary); }
.suggest__opt--all { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.suggest__empty { padding: 12px 10px; color: var(--text-2); font-size: 15px; }
mark { background: transparent; color: inherit; font-weight: 650; box-shadow: inset 0 -0.45em 0 rgba(196, 166, 240, 0.45); }

/* ---------- Home ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  margin-top: 16px;
  padding: 36px 22px 32px;
  border-radius: 24px;
  background: var(--surface);
  overflow: hidden;
}
.hero__title { font-family: var(--display); font-weight: 700; font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1.02; letter-spacing: -0.03em; }
.hero__lede { margin-top: 12px; max-width: 44ch; font-size: 1.05rem; color: var(--text-2); }
.hero .search { margin-top: 24px; }
.hero__try { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.hero__try a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.hero__try a:hover { color: var(--primary); text-decoration-color: currentColor; }
.hero__tomi { display: none; }
@media (min-width: 768px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; margin-top: 24px; padding: 56px 56px 52px; border-radius: 28px; }
  .hero__tomi { display: block; width: 170px; height: auto; margin: -8px 12px -60px 0; align-self: end; }
}
@media (min-width: 1024px) { .hero__tomi { width: 200px; margin-right: 48px; } }

.block { margin-top: clamp(48px, 7vw, 80px); }
.block__title { font-size: 1.4rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }

.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
@media (min-width: 900px) { .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.cat { display: flex; flex-direction: column; height: 100%; padding: 16px; border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; transition: background 150ms var(--ease); }
.cat:hover { background: var(--surface-2); }
.cat__icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 28px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.cat__icon .ico { width: 18px; height: 18px; }
.cat__title { font-size: 15.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.cat__count { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
@media (min-width: 900px) { .cat { padding: 20px; } .cat__icon { margin-bottom: 40px; } }
.ico { fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.faq { display: grid; gap: 8px; margin-top: 20px; }
@media (min-width: 900px) { .faq { grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: start; } }
.faq__item { border-radius: 14px; background: var(--surface); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 18px; font-size: 15.5px; font-weight: 550; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.chev { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--bg); fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease); }
.faq__item[open] .chev { transform: rotate(180deg); }
.faq__body { padding: 0 18px 18px; color: var(--text-2); font-size: 15px; }
.more { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin-top: 6px; font-weight: 600; text-decoration: none; }
.more .arrow { width: 16px; height: 16px; stroke: currentColor; }
.arrow { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.contact { display: grid; gap: 16px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: 18px; }
@media (min-width: 640px) { .contact { grid-template-columns: 1fr auto; padding: 28px 32px; } }
.contact__title { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.015em; }
.contact__text { margin-top: 4px; color: var(--text-2); font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: opacity 150ms var(--ease); justify-self: start; }
.btn:hover { opacity: 0.86; }

/* ---------- Docs layout (topic and article pages) ---------- */

.docs { display: grid; gap: 32px; padding-top: 8px; }
@media (min-width: 1024px) { .docs { grid-template-columns: 248px minmax(0, 1fr); gap: 56px; padding-top: 24px; } }
.docs__main { min-width: 0; max-width: 720px; }
.side { display: none; }
@media (min-width: 1024px) {
  .side { display: block; position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; padding: 8px 0 24px; }
}
.side__label { padding: 0 10px 8px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.side a { display: flex; align-items: center; min-height: 34px; padding: 5px 10px; border-radius: 8px; color: var(--text-2); font-size: 14.5px; line-height: 1.35; text-decoration: none; }
.side a:hover { background: var(--surface); color: var(--text); }
.side .is-open > .side__cat { color: var(--text); font-weight: 600; }
.side__sub { margin: 2px 0 8px 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.side__sub a { font-size: 14px; }
.side a[aria-current] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.crumbs { margin-top: 16px; font-size: 13.5px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text-2); }

.page-title { margin-top: 12px; font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.page-lede { margin-top: 12px; font-size: 1.1rem; line-height: 1.55; color: var(--text-2); }

.list { margin-top: 28px; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: grid; gap: 3px; padding: 18px 0; color: var(--text); text-decoration: none; }
.list__title { font-weight: 600; line-height: 1.35; }
.list a:hover .list__title { color: var(--primary); }
.list__sum { font-size: 15px; line-height: 1.5; color: var(--text-2); }

/* ---------- Article ---------- */

.toc { margin-top: 28px; padding: 14px 0 14px 16px; border-left: 2px solid var(--line); }
.toc__title { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.toc ul { display: grid; margin-top: 4px; }
.toc a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-2); font-size: 15px; text-decoration: none; }
.toc a:hover { color: var(--primary); }

.prose { margin-top: 32px; font-size: 16.5px; line-height: 1.72; }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 44px; font-size: 1.3rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; }
.prose h3 { margin-top: 28px; font-size: 1.08rem; font-weight: 650; }
.prose strong { font-weight: 600; color: var(--text); }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul { display: grid; gap: 8px; }
.prose ul > li { position: relative; padding-left: 20px; }
.prose ul > li::before { content: ""; position: absolute; left: 4px; top: 0.75em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); }
.prose li ul { margin-top: 8px; }
.prose .steps { display: grid; gap: 14px; counter-reset: step; }
.prose .steps > li { position: relative; min-height: 26px; padding-left: 38px; counter-increment: step; }
.prose .steps > li::before { content: counter(step); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text); font-size: 13px; font-weight: 600; line-height: 1; }
.prose .steps ul { margin-top: 8px; }

.note { padding: 14px 18px; border-radius: 12px; background: var(--surface); font-size: 15.5px; color: var(--text-2); }

.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table th, .table td { padding: 11px 16px; text-align: left; vertical-align: top; }
.table thead th { background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); }
.table tbody tr + tr > * { border-top: 1px solid var(--line); }
.table tbody th { font-weight: 600; min-width: 130px; }
.table td { color: var(--text-2); min-width: 160px; }
@media (max-width: 639px) {
  .table { overflow: visible; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table table, .table tbody, .table tr, .table th, .table td { display: block; }
  .table tbody tr { padding: 14px 16px; }
  .table tbody tr + tr { border-top: 1px solid var(--line); }
  .table tbody tr + tr > * { border-top: 0; }
  .table th, .table td { padding: 0; min-width: 0; }
  .table td { margin-top: 4px; }
  .table:not(.table--2) td::before { content: attr(data-label); display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
}

.soon { display: inline-block; padding: 0 7px; border: 1px dashed currentColor; border-radius: 6px; color: #7A5A1F; font-size: 12.5px; font-weight: 600; line-height: 1.7; vertical-align: 1px; white-space: nowrap; }

.helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.helpful__q { font-weight: 550; color: var(--text-2); }
.helpful__btns { display: flex; gap: 8px; }
.pill { min-height: 40px; min-width: 60px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); font-size: 14.5px; font-weight: 550; cursor: pointer; transition: border-color 150ms var(--ease), background 150ms var(--ease); }
.pill:hover { border-color: var(--text); }
@media (pointer: coarse) { .pill { min-height: 44px; } }
.helpful__done { color: var(--text-2); }

.related { margin-top: 40px; }
.related__title { font-size: 1rem; font-weight: 650; }
.related ul { display: grid; margin-top: 8px; }
.related a { display: inline-flex; align-items: center; min-height: 36px; font-weight: 500; text-decoration: none; }
.related a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Search results ---------- */

.results { margin-top: 24px; }
.didyou { margin-bottom: 12px; }
.didyou a { font-weight: 600; }
.hits { margin-top: 12px; border-top: 1px solid var(--line); }
.hit { border-bottom: 1px solid var(--line); }
.hit a { display: grid; gap: 3px; padding: 18px 0; color: var(--text); text-decoration: none; }
.hit__cat { font-size: 13px; color: var(--muted); }
.hit__title { font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.hit a:hover .hit__title { color: var(--primary); }
.hit__snip { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.noresults { margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); font-size: 14.5px; text-decoration: none; }
.tags a:hover { border-color: var(--text); }
.nf .search { margin-top: 24px; }

/* ---------- Footer ---------- */

.foot { margin-top: clamp(64px, 9vw, 112px); padding: 28px 0 36px; border-top: 1px solid var(--line); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot__logo { width: auto; height: 18px; }
.foot__small { font-size: 13.5px; color: var(--muted); }
.foot__small a { color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Phones: keep the header on one line, and topic cards compact */
@media (max-width: 479px) {
  .top__in { gap: 0 12px; }
  .logo { gap: 8px; }
  .logo img { height: 19px; }
  .logo__help { font-size: 14px; }
  .top__cta { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .cat__icon { margin-bottom: 18px; }
}
@media (max-width: 359px) { .logo__help { display: none; } }
