/* Help & guide, and the documents that share its reading layout (legal pages, the company guide).
   Tokens, the site header and the footer come from base.css. */
.help-page { --reading: #4a5a50; background: var(--paper); }
.help-page code { padding: 2px 6px; border-radius: 5px; background: var(--lime-wash); color: var(--ink-2); font-family: var(--font-mono); font-size: .86em; }
#guide:focus, #document:focus { outline: 0; }

/* A centred column on the same grid as every other public page. */
.help-shell { width: min(1240px, calc(100% - 128px)); margin-inline: auto; }

/* Earlier guide header, kept for the company guide; public pages use the shared .topbar. */
.help-header { display: flex; align-items: center; gap: 18px; min-height: 100px; border-bottom: 1px solid var(--line-soft); }
.help-header__divider { width: 1px; height: 22px; background: var(--line); }
.help-header__label { color: var(--muted); font-size: 14px; font-weight: 550; }
.help-header > .help-return { margin-left: auto; }
.help-return {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #e8eada;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color .2s var(--ease);
}
.help-return:hover { background: #dfe5d1; }
.help-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ───────── Hero ───────── */
.help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  padding-block: clamp(56px, 7vw, 96px) clamp(56px, 6vw, 84px);
}
.help-hero .eyebrow { margin-bottom: 26px; }
.help-hero h1 { margin: 0; font-size: clamp(44px, 4.8vw, 70px); font-weight: 650; line-height: 1.02; letter-spacing: -.055em; text-wrap: balance; }
.help-lede { max-width: 460px; margin: 24px 0 32px; color: var(--muted); font-size: 19px; line-height: 1.6; text-wrap: pretty; }
.help-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  min-height: 58px;
  padding: 6px 10px 6px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 32px -26px rgba(26, 40, 35, .4);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.help-search:focus-within { border-color: var(--lime-strong); box-shadow: 0 0 0 4px var(--lime-wash), 0 16px 32px -26px rgba(26, 40, 35, .4); }
.help-search > svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; }
.help-search input { flex: 1; width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.help-search input::placeholder { color: var(--muted); opacity: 1; }
.help-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.help-search button { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); font-size: 22px; cursor: pointer; }
.help-search button:hover { background: var(--lime); }
.help-search kbd { display: grid; flex: none; place-items: center; min-width: 26px; height: 26px; margin-right: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font: 12px var(--font-mono); }

/* Illustration: a nudge from the companion. Decorative. */
.help-illustration { min-width: 0; margin: 0; }
.help-illustration__scene { position: relative; isolation: isolate; max-width: 400px; height: 280px; margin: 0 auto; }
.guide-orbit { position: absolute; z-index: -1; border: 1px solid #e4e9db; border-radius: 50%; pointer-events: none; }
.guide-orbit--one { top: 1px; left: 46px; width: 264px; height: 264px; background: radial-gradient(ellipse, #edf2e55e 35%, #fafbf300 70%); }
.guide-orbit--two { top: -30px; left: 16px; width: 325px; height: 325px; opacity: .6; }
.guide-message { position: absolute; top: 6px; right: 27px; left: 0; display: flex; align-items: center; gap: 11px; padding: 15px 17px; border: 1px solid #e1e6d9; border-radius: 16px 16px 16px 5px; background: #f4f5ec; box-shadow: 0 8px 26px -17px #415d3c20; transform: rotate(-3deg); }
.guide-person { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--peach); color: #7a5034; font-size: 11px; font-weight: 700; }
.guide-message__name { color: var(--muted); font-size: 11px; font-weight: 600; }
.guide-message p { margin: 4px 0 0; font-size: 14px; }
.guide-message__heart { margin-left: auto; color: #91a181; font-size: 24px; }
.guide-assistant { position: absolute; top: 104px; right: 0; left: 66px; padding: 20px 22px; border: 1px solid #d7e3cc; border-radius: 18px 18px 5px 18px; background: var(--surface); box-shadow: 0 16px 35px -22px #44643b45; transform: rotate(2deg); }
.guide-assistant__header { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.guide-assistant__header > span { font-size: 15px; }
.guide-assistant__header small { margin-left: auto; color: var(--muted); font: 500 9px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.guide-assistant p { margin: 12px 0 16px; font-size: 14px; line-height: 1.6; }
.guide-assistant__actions { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.guide-assistant__actions > span:first-child { padding: 6px 12px; border-radius: 999px; background: #e8eada; color: var(--ink); font-weight: 650; }
.guide-assistant__actions b { margin-left: 10px; font-weight: 400; }
.guide-pet { position: absolute; bottom: -8px; left: 0; width: 76px; transform: rotate(-6deg); }
.guide-pet img { display: block; width: 100%; height: auto; }
.guide-spark { position: absolute; color: #b0bc95; font-size: 16px; }
.guide-spark--one { top: 52px; right: -3px; }
.guide-spark--two { top: 157px; left: 17px; font-size: 12px; }
.help-illustration figcaption { margin: 26px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.help-illustration figcaption > span { display: block; margin-top: 2px; font: 500 10px/1.6 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

/* ───────── First steps ─────────
   The same two columns as the guide below: the intro over the index, the steps over the topics. */
.help-start {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px clamp(40px, 6vw, 96px);
  padding-block: 44px 48px;
  border-block: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.help-section-intro .eyebrow { margin-bottom: 18px; }
.help-section-intro h2 { margin: 0 0 8px; font-size: 28px; font-weight: 650; line-height: 1.1; letter-spacing: -.045em; }
.help-section-intro p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.help-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.help-steps li { display: flex; flex-direction: column; align-items: flex-start; }
.help-step-number {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 7px;
  color: var(--ink);
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .08em;
  opacity: .9;
}
.help-steps h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; }
.help-steps p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.help-steps p strong { color: var(--ink); font-weight: 600; }
.help-steps a {
  margin-top: auto;
  padding-block: 14px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--lime-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.help-steps a:hover { text-decoration-color: var(--ink); }

/* ───────── Guide: an index beside the topics ───────── */
.help-guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); padding-block: 64px 0; scroll-margin-top: 24px; }
.help-index { position: sticky; top: 28px; align-self: start; }
.help-index > .help-eyebrow { margin-bottom: 12px; }
.help-index nav { display: grid; }
.help-index nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease);
}
.help-index nav a:hover, .help-index nav a[aria-current] { color: var(--ink); }
.help-index nav a[aria-current] { font-weight: 650; box-shadow: inset 0 -2px 0 var(--lime-strong); }
.help-index nav a span { color: var(--faint); font: 500 11px var(--font-mono); }
.help-index__note { display: flex; align-items: flex-start; gap: 10px; margin-top: 28px; color: var(--muted); }
.help-index__note > span { flex: none; font-size: 15px; line-height: 1.5; }
.help-index__note p { margin: 0; font-size: 13px; line-height: 1.6; }

.help-topics { min-width: 0; }
.help-topic-group + .help-topic-group { margin-top: 52px; }
.help-group-heading { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.help-group-heading > span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 7px;
  color: var(--ink);
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .08em;
  opacity: .9;
}
.help-group-heading h2 { margin: 0; font-size: 26px; font-weight: 650; line-height: 1.15; letter-spacing: -.04em; }

/* Topics: quiet cards that open in place. */
.help-topic {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  scroll-margin-top: 24px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.help-topic:hover { border-color: var(--lime-strong); }
.help-topic[open] { box-shadow: 0 22px 44px -40px rgba(26, 40, 35, .45); }
.help-topic:target { border-color: var(--ink-2); box-shadow: 0 0 0 3px var(--lime-wash); }
.help-topic--featured { border-color: #d6e0c8; background: var(--lime-wash); }
.help-topic summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 18px 22px 18px 26px;
  border-radius: 17px;
  list-style: none;
  cursor: pointer;
}
.help-topic summary::-webkit-details-marker { display: none; }
.help-topic summary strong { display: block; font-size: 17px; font-weight: 650; line-height: 1.35; letter-spacing: -.015em; }
.help-topic summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.help-plus { position: relative; display: block; flex: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.help-plus::before, .help-plus::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease); }
.help-plus::after { transform: rotate(90deg); }
.help-topic summary:hover .help-plus { border-color: var(--lime-strong); }
.help-topic[open] .help-plus { border-color: var(--lime-strong); background: var(--lime); }
.help-topic[open] .help-plus::after { transform: rotate(0deg); }
.help-topic__body { max-width: 72ch; margin: 0 26px; padding: 2px 0 28px; color: var(--reading); font-size: 15.5px; line-height: 1.75; }
.help-topic__body > :first-child { margin-top: 0; }
.help-topic__body > :last-child { margin-bottom: 0; }
.help-topic__body p { margin: 14px 0; }
.help-topic__body h3 { margin: 28px 0 8px; color: var(--ink); font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.help-topic__body strong { color: var(--ink); font-weight: 600; }
.help-topic__body a { color: var(--ink); text-decoration-color: var(--lime-strong); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.help-topic__body a:hover { text-decoration-color: var(--ink); }
.help-topic__body ul, .help-topic__body ol { margin: 14px 0; padding-left: 22px; }
.help-topic__body li { margin: 8px 0; padding-left: 4px; }
.help-topic__body li::marker { color: var(--ink-2); }

.help-companion { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; gap: 32px; padding-top: 6px; }
.help-companion__portrait { margin: 0; text-align: center; }
.help-companion__portrait img { display: block; width: 150px; height: auto; max-width: 100%; margin-inline: auto; }
.help-companion__portrait figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.help-companion__copy > :first-child { margin-top: 0; }
.help-topic__body .help-companion__controls { margin: 18px 0 8px; padding: 0; list-style: none; }
.help-companion__controls li { margin: 0; padding: 12px 0 12px; border-top: 1px solid var(--line); }
.help-topic__body .help-inline-link, .help-topic__body .help-tech-links a {
  display: inline-block;
  padding-block: 10px;
  font-size: 15px;
  font-weight: 650;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.help-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 20px; }
.help-comparison > div { padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--lime-wash); }
.help-comparison > div:last-child { background: var(--paper); }
.help-mode { display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid #d0dcc1; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; }
.help-comparison p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.65; }
.help-topic__body .help-key-list { display: grid; gap: 10px; margin: 4px 0 20px; padding: 0; list-style: none; }
.help-key-list li { display: flex; align-items: baseline; gap: 14px; margin: 0; padding: 0; }
.help-key-list code { flex: none; width: 34px; border: 1px solid var(--line); text-align: center; }
.help-instructions { padding-left: 22px; }
.help-shortcuts { margin: 0; }
.help-shortcuts > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.help-shortcuts dd { margin: 0; }
.help-page kbd { display: inline-block; min-width: 24px; padding: 0 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--ink); font: 12px/1.75 var(--font-mono); text-align: center; }
.help-topic__body .help-tech-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 26px; padding: 0; list-style: none; }
.help-tech-flow li { margin: 0; padding: 18px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--paper); }
.help-tech-flow li > span { display: block; margin-bottom: 12px; color: var(--muted); font: 500 11px var(--font-mono); }
.help-tech-flow strong { display: block; font-size: 15px; }
.help-tech-flow p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }
.help-tech-links { display: flex; flex-wrap: wrap; gap: 0 26px; margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

.help-empty { margin: 0; padding: 28px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.help-empty button {
  display: block;
  min-height: 44px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--lime-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: pointer;
}

/* A quiet way back to the conversation. */
.help-outro { display: flex; align-items: center; gap: 22px; margin-top: 72px; padding: 32px 36px; border: 1px solid var(--line); border-radius: 28px; background: var(--paper-2); }
.help-outro > span { color: var(--ink-2); font-size: 30px; line-height: 1; }
.help-outro h2 { margin: 0 0 6px; font-size: 28px; font-weight: 650; line-height: 1.1; letter-spacing: -.045em; }
.help-outro p { margin: 0; color: var(--muted); font-size: 15px; }
.help-outro > .btn { flex: none; margin-left: auto; }
.help-page .site-footer { margin-top: 72px; }

@media (max-width: 1000px) {
  .help-hero { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); }
  .help-illustration__scene { transform: scale(.9); transform-origin: center; }
  .help-guide { grid-template-columns: 180px minmax(0, 1fr); gap: 40px; }
  .help-start { grid-template-columns: minmax(0, 1fr); }
  .help-section-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }
  .help-section-intro .eyebrow { margin: 0; }
  .help-section-intro h2 { margin: 0; }
}
@media (max-width: 900px) {
  .help-shell { width: calc(100% - 64px); }
}
@media (max-width: 760px) {
  .help-header { min-height: 82px; gap: 14px; }
  .help-header__divider, .help-header__label { display: none; }
  .help-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 40px 44px; }
  .help-hero h1 { font-size: clamp(40px, 10.5vw, 54px); }
  .help-lede { margin-block: 18px 26px; font-size: 17px; }
  .help-search { max-width: none; }
  .help-search kbd { display: none; }
  .help-illustration { display: none; }
  .help-start { padding-block: 32px 36px; }
  .help-section-intro p:last-child { display: none; }
  .help-steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .help-steps li { position: relative; padding-left: 46px; }
  .help-step-number { position: absolute; top: 0; left: 0; }
  .help-steps h3 { margin-top: 2px; }
  .help-steps a { padding-top: 8px; }
  .help-guide { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 36px; }
  .help-index { position: static; }
  .help-index > .help-eyebrow, .help-index__note { display: none; }
  .help-index nav { display: flex; flex-wrap: wrap; gap: 8px; }
  .help-index nav a { min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; }
  .help-index nav a[aria-current] { box-shadow: none; border-color: var(--lime-strong); background: var(--lime-wash); }
  .help-index nav a span { display: none; }
  .help-topic-group + .help-topic-group { margin-top: 40px; }
  .help-group-heading h2 { font-size: 22px; }
  .help-topic summary { min-height: 72px; padding: 16px 16px 16px 20px; }
  .help-topic summary strong { font-size: 16px; }
  .help-topic summary small { font-size: 13.5px; }
  .help-topic__body { margin-inline: 20px; font-size: 15px; }
  .help-comparison { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .help-outro { flex-wrap: wrap; margin-top: 48px; padding: 26px 24px; border-radius: 24px; }
  .help-outro > .btn { margin-left: 0; }
  .help-page .site-footer { margin-top: 48px; }
}
@media (max-width: 600px) {
  .help-shell { width: calc(100% - 40px); }
}
@media (max-width: 540px) {
  .help-companion { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .help-companion__portrait img { width: 120px; }
  .help-topic__body .help-tech-flow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .help-shortcuts > div { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .help-page *, .help-page *::before, .help-page *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .help-header, .help-hero, .help-index, .help-outro, .site-footer, .help-search, .help-start { display: none; }
  .help-page { background: #fff; }
  .shell, .help-shell { width: 100%; }
  .help-guide { display: block; padding: 0; }
  .help-topic { break-inside: avoid; background: #fff; box-shadow: none; }
  .help-topic__body { display: block; }
}
