/* Help pages (landing/aide, landing/help): the sales page's look
   (landing/index.html: same colors, fonts, header and footer), plus the
   help's own layout. Keep the shared values in step with index.html. */
:root {
  --bg: #f5f4f0;
  --fg: #121211;
  --muted: #6d6b65;
  --line: #d8d5cc;
  --card: #ecebe5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0e;
    --fg: #ecebe6;
    --muted: #9a978f;
    --line: #2c2b28;
    --card: #191918;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 20;
  background: var(--fg); color: var(--bg); padding: 8px 14px; text-decoration: none;
}
.skip:focus { top: 8px; }

/* Header (as on the sales page) */
header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { font: 22px/1 var(--serif); text-decoration: none; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.brand svg { width: 18px; height: 18px; }
header .section { color: var(--muted); text-decoration: none; font-size: 15px; border-left: 1px solid var(--line); padding-left: 20px; }
header .section:hover { color: var(--fg); }
header .lang { margin-left: auto; font-size: 14px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 5px 9px; }
header .lang:hover { color: var(--fg); border-color: var(--fg); }
.button {
  display: inline-block; font: inherit; font-size: 14px; text-decoration: none;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); padding: 7px 14px;
  transition: opacity .15s;
}
.button:hover { opacity: .82; }
@media (max-width: 520px) {
  header .wrap { gap: 12px; }
  header .section { padding-left: 12px; }
  header .button { display: none; }
}

/* Layout: topics on the left, the page on the right */
.help {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(32px, 5vw, 56px); padding-bottom: 72px;
}
.topics { position: sticky; top: 84px; align-self: start; }
.topics .topics-title {
  font: 13px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 12px; padding: 0; border: 0;
}
.topics ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.topics li { margin: 0; border-bottom: 1px solid var(--line); }
.topics a { display: block; padding: 8px 0; font-size: 15px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.topics a:hover { color: var(--fg); }
.topics a[aria-current="page"] { color: var(--fg); font-weight: 600; }
/* Small screens: the topics after the page */
@media (max-width: 860px) {
  .help { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .topics { position: static; order: 2; }
}

/* The page */
main { max-width: 780px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 54px); line-height: 1.05; letter-spacing: -0.02em; }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--muted); margin: 18px 0 36px; }
h2 { font-size: clamp(25px, 3vw, 31px); line-height: 1.15; margin: 52px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
p, ul, ol, dl, table { margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
li > ul { margin: 8px 0 0; }
code {
  font: .86em/1.4 var(--mono); background: var(--card); padding: 1px 5px;
  overflow-wrap: anywhere;
}
em { font-style: normal; font-weight: 600; }
dt { font-weight: 600; margin-top: 12px; }
dd { margin: 2px 0 0 0; color: var(--muted); }
dd code { color: var(--fg); }

ol.steps { list-style: none; padding: 0; counter-reset: step; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 12px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border: 1px solid var(--fg); border-radius: 50%;
  font: 14px/24px var(--sans); text-align: center;
}

.note { background: var(--card); border-left: 3px solid var(--fg); padding: 14px 18px; font-size: 16px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
td code { overflow-wrap: normal; white-space: nowrap; }
th { font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

figure { margin: 24px 0 30px; }
figure a { display: block; border: 1px solid var(--line); background: var(--card); }
figure a:hover { border-color: var(--fg); }
figure.phone { max-width: 300px; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Help index */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cards li { margin: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cards a { display: block; height: 100%; padding: 18px 20px; text-decoration: none; }
.cards a:hover { background: var(--card); }
.cards strong { display: block; font: 21px/1.25 var(--serif); font-weight: 400; margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: 15px; }
@media (max-width: 560px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* Previous / next */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--fg); }
.pager a { text-decoration: none; max-width: 48%; font: 19px/1.3 var(--serif); }
.pager a span { display: block; font: 13px/1.6 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pager .next { text-align: right; margin-left: auto; }
.pager a:hover { text-decoration: underline; }

/* Footer (as on the sales page) */
footer { padding: 40px 0 56px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer .ask { flex-basis: 100%; margin: 0 0 8px; font-size: 16px; color: var(--fg); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
