* { box-sizing: border-box; }
html { color-scheme: dark; }
html[data-controller-theme="light"] { color-scheme: light; }
body { margin: 0; min-width: 0; background: var(--cs-bg); color: var(--cs-text); font: 400 16px/1.55 "IBM Plex Sans", sans-serif; }
a { color: var(--cs-accent); text-underline-offset: .18em; }
a:focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 3px; border-radius: 3px; }
.help-header { --cs-top-bar-spacing: 8px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-right: max(20px, env(safe-area-inset-right)); padding-bottom: 8px; padding-left: max(20px, env(safe-area-inset-left)); min-height: 60px; border-bottom: 1px solid var(--cs-divider); }
.help-header > a:first-child { display: inline-flex; align-items: center; min-height: 44px; }
.help-header img { display: block; width: 142px; max-width: 48vw; height: auto; }
.brand-wordmark--light { display: none !important; }
html[data-controller-theme="light"] .brand-wordmark--light { display: block !important; }
html[data-controller-theme="light"] .brand-wordmark--dark { display: none !important; }
.help-header > a:last-child { color: var(--cs-text-2); text-decoration: none; font-size: 14px; }
.help-main { width: min(100% - 40px, 680px); margin: 0 auto; padding: clamp(28px, 5vw, 58px) 0 48px; }
.help-main > .cs-page-title { margin-bottom: 30px; }
.help-back { display: inline-block; margin-bottom: 32px; color: var(--cs-text-2); }
.help-cards { display: grid; gap: 12px; }
/* A labelled set of pages inside a guide, such as Curate's Smart Snacks (owner, 2026-10-21). */
.help-cards-group { grid-column: 1 / -1; margin: 14px 0 0; color: var(--cs-text-muted); font: 500 11px/1.4 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.help-card { display: flex; flex-direction: column; gap: 3px; padding: 18px 20px; border: 1px solid var(--cs-border-card); border-radius: 12px; background: var(--cs-surface); color: var(--cs-text); text-decoration: none; }
.help-card:hover { border-color: var(--cs-border-strong); }
.help-card--inactive { color: var(--cs-text-faint); cursor: default; }
.help-card--inactive:hover { border-color: var(--cs-border-card); }
.help-card span { color: var(--cs-text-muted); font-size: 14px; }
.help-article { overflow-wrap: anywhere; }
/* A divider above each main section keeps one section's subsections apart from the next (owner, 2026-11-06). */
.help-article h2 { margin: 32px 0 8px; padding-top: 24px; border-top: 1px solid var(--cs-divider); font: 600 21px/1.3 "IBM Plex Sans", sans-serif; letter-spacing: -.02em; }
.help-article h3, .help-article h4 { margin: 24px 0 8px; font-size: 17px; }
.help-article p { margin: 0 0 16px; }
.help-article ul, .help-article ol { padding-left: 1.4em; }
.help-article li { margin: 4px 0; }
.help-article code { font: 500 .9em "IBM Plex Mono", monospace; }
.help-tip { margin: 22px 0; padding: 16px 18px; border-left: 3px solid var(--cs-accent); background: var(--cs-surface); }
.help-tip p { margin: 0; }
.help-shot { margin: 24px auto; width: min(100%, 375px); }
.help-weather-picture { width: min(100%, 220px); margin: 8px auto 22px; }
.help-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--cs-border-card); border-radius: 12px; }
.help-shot-light { display: none !important; }
html[data-controller-theme="light"] .help-shot-dark { display: none !important; }
html[data-controller-theme="light"] .help-shot-light { display: block !important; }
.help-page-nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; padding-top: 24px; border-top: 1px solid var(--cs-divider); }
.help-footer { margin: 0 auto; padding: 20px; border-top: 1px solid var(--cs-divider); color: var(--cs-text-muted); text-align: center; font-size: 13px; }
@media (max-width: 360px) { .help-main { width: calc(100% - 32px); } }

/* A very faint sign-off under the footer (owner request, 2026-10-13). */
.help-motto { display: block; margin-top: 10px; font-size: 11px; letter-spacing: .06em; opacity: .42; }
/* Proposed desktop layout for Help (Stencil, 2026-10-21). Phones and tablets keep today's single column and cards. */
.help-guides, .help-sidebar, .help-home-start { display: none; }
/* The Help home wraps its two versions, so the title spacing follows them in. */
:is(.help-home-cards, .help-home-start) > .cs-page-title { margin-bottom: 30px; }

@media (min-width: 1100px) {
  /* One frame: the wordmark, the guide bar and the content share one left edge. */
  .help-header, .help-guides { padding-inline: max(32px, calc((100% - 944px) / 2)); }
  .help-main { width: min(100% - 64px, 944px); }

  /* The guide bar: every guide, one click away. */
  .help-guides { display: block; border-bottom: 1px solid var(--cs-divider); }
  .help-guides ul { display: flex; flex-wrap: wrap; gap: 0 28px; margin: 0; padding: 0; list-style: none; }
  .help-guides a, .help-guide-soon { display: flex; align-items: center; min-height: 48px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--cs-text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
  .help-guides a:hover { color: var(--cs-text); }
  .help-guides a[aria-current="true"] { border-bottom-color: var(--cs-accent); color: var(--cs-text); }
  .help-guide-soon { gap: 6px; color: var(--cs-text-faint); }
  .help-guide-soon small { font-size: 11px; }

  .help-main--with-nav { display: grid; grid-template-columns: 208px minmax(0, 680px); column-gap: 56px; align-items: start; }
  .help-main--with-nav > * { grid-column: 2; }
  .help-main--with-nav > .help-back { display: none; }
  .help-main--with-nav .help-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* The contents list: this guide's pages, and the sections of the page you're on.
     The -14px lines the link text up with the wordmark; the current page's bar sits in the margin. */
  .help-sidebar { display: block; grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 32px; max-height: calc(100vh - 64px); margin-left: -14px; overflow: auto; font-size: 14px; line-height: 1.35; }
  .help-sidebar ul { margin: 0; padding: 0; list-style: none; }
  .help-sidebar a { display: block; padding: 7px 12px; border-left: 2px solid transparent; color: var(--cs-text-2); text-decoration: none; }
  .help-sidebar a:hover { color: var(--cs-text); }
  .help-sidebar a[aria-current="page"] { border-left-color: var(--cs-accent); color: var(--cs-accent); }
  .help-sidebar .help-sidebar-guide { margin: 0 0 10px; padding-left: 14px; color: var(--cs-text-muted); font: 500 11px/1.4 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
  .help-sidebar-sections { margin: 2px 0 8px !important; }
  .help-sidebar .help-sidebar-group { margin: 16px 0 6px; padding: 10px 0 0 14px; border-top: 1px solid var(--cs-divider); color: var(--cs-text-muted); font: 500 11px/1.4 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
  .help-sidebar-sections a { padding: 5px 12px 5px 26px; color: var(--cs-text-muted); font-size: 13px; }
  .help-article h2 { scroll-margin-top: 24px; }

  /* Help home on a computer: Start here itself, not the cards. */
  .help-home-cards { display: none; }
  .help-home-start { display: block; }

  /* Screenshots: a phone-sized picture, not a full-height interruption. */
  .help-shot:not(.help-weather-picture) { width: 320px; }
  .help-card { min-height: 104px; }
}

@media (min-width: 1320px) {
  .help-header, .help-guides { padding-inline: calc((100% - 1272px) / 2); }
  .help-main { width: 1272px; }
  .help-main--with-nav { grid-template-columns: 208px minmax(0, 680px) 280px; column-gap: 52px; }
  /* A guide's contents use the margin too: three columns of cards. */
  .help-main--with-nav > .help-cards { grid-column: 2 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Screenshots sit in the right margin beside the words they show. */
  .help-article .help-shot:not(.help-weather-picture) { float: right; clear: right; width: 280px; margin: 6px -332px 24px 52px; }
  /* A section starts below the last one's screenshots, so its own sit beside it rather than drifting down. */
  .help-article h2 { clear: right; margin-right: -332px; }
  /* help.js moves a section's screenshots after its heading; the first rises by the heading's line and margin to meet its top. */
  .help-article .help-shot.help-shot--lead { margin-top: calc(-21px * 1.3 - 8px); }
  .help-article .help-shot.help-shot--top { margin-top: 0; }
  .help-page-nav { clear: both; }
}
