/* ==========================================================================
   GRAPHITE · help centre (/help): home, topics, articles, search.
   Uses the graphite.css tokens; never hard-code the accent.
   ========================================================================== */

.g-help { padding-top: 28px; }
.g-help-sec { padding: clamp(40px, 6vw, 72px) 0; }
.g-help-sec--top { padding-top: 0; }
.g-help-sec--tint { background: var(--g-bg-2); }
.g-help-h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 24px; }
.g-help-title { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); line-height: 1.06; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; margin: 0 0 14px; }
.g-help-muted { color: var(--g-muted); margin: 18px 0; }
.g-help-narrow { max-width: 860px; }

/* ---------- Hero and search ---------- */
.g-help-hero { margin-top: -28px; padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); background:
    radial-gradient(60% 120% at 100% 0%, rgb(var(--g-accent-rgb) / .12), transparent 70%), var(--g-bg-2); border-bottom: 1px solid var(--g-line); }
.g-help-hero__title { font-size: clamp(2.6rem, 1.5rem + 4.4vw, 4.6rem); line-height: 1; font-weight: 800; letter-spacing: -.045em; margin: 14px 0 16px; }
.g-help-search { position: relative; display: flex; align-items: center; gap: 10px; max-width: 720px; margin-top: 30px; padding: 8px 8px 8px 18px;
    background: var(--g-paper); border: 1px solid var(--g-line-2); border-radius: 16px; box-shadow: var(--g-shadow); transition: border-color .15s, box-shadow .15s; }
.g-help-search:focus-within { border-color: var(--g-accent-deep); box-shadow: 0 0 0 4px var(--g-accent-soft), var(--g-shadow); }
.g-help-search__icon { display: grid; place-items: center; color: var(--g-muted); }
.g-help-search__input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; font: 600 16.5px/1.3 var(--g-font); color: var(--g-ink); }
.g-help-search__input:focus { outline: none; }
.g-help-search__input::-webkit-search-cancel-button { cursor: pointer; }
.g-help-search__btn { min-height: 46px; padding: 0 20px; border-radius: 11px; }
.g-help-search--hero { margin-top: 34px; }
.g-help-side .g-help-search { margin: 0 0 28px; box-shadow: none; padding-left: 14px; }
.g-help-side .g-help-search__btn { display: none; }
.g-help-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; padding: 6px; background: var(--g-paper); border: 1px solid var(--g-line-2); border-radius: 14px; box-shadow: var(--g-shadow); }
.g-help-suggest__item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.g-help-suggest__item strong { color: var(--g-ink); font-weight: 700; }
.g-help-suggest__item span { font-size: 13px; color: var(--g-muted); }
.g-help-suggest__item:hover, .g-help-suggest__item.is-active { background: var(--g-accent-soft); }
.g-help-suggest__none { margin: 0; padding: 10px 12px; font-size: 14px; color: var(--g-muted); }

/* ---------- Topics ---------- */
.g-help-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.g-help-cat { display: flex; flex-direction: column; padding: 24px; background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--g-radius-lg);
    transition: border-color .25s, transform .25s var(--g-ease), box-shadow .25s; }
.g-help-cat:hover { border-color: var(--g-accent-line); transform: translateY(-2px); box-shadow: var(--g-shadow); }
.g-help-cat__head { display: flex; gap: 14px; align-items: center; text-decoration: none; }
.g-help-cat__head h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.g-help-cat__head small { display: block; font-size: 13px; color: var(--g-muted); font-weight: 600; margin-top: 2px; }
.g-help-cat__icon { width: 46px; height: 46px; border-radius: 14px; background: var(--g-accent-soft); color: var(--g-accent-deep); display: grid; place-items: center; flex: 0 0 auto; }
.g-help-cat__icon--lg { width: 60px; height: 60px; border-radius: 18px; }
.g-help-cat > p { margin: 14px 0 12px; font-size: 15px; line-height: 1.55; }
.g-help-cat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-help-cat li a { display: block; padding: 6px 0; font-size: 15px; font-weight: 600; color: var(--g-ink-2); text-decoration: none; }
.g-help-cat li a:hover { color: var(--g-accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.g-help-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-weight: 800; font-size: 14.5px; color: var(--g-accent-deep); text-decoration: none; }
.g-help-cathead { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 30px; }
.g-help-cathead .g-help-title { margin-bottom: 8px; }

/* ---------- Article lists ---------- */
.g-help-list { display: grid; gap: 10px; }
.g-help-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-help-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--g-radius); text-decoration: none;
    transition: border-color .2s, transform .2s var(--g-ease); }
.g-help-row:hover { border-color: var(--g-accent-line); transform: translateX(2px); }
.g-help-row > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; flex: 1; }
.g-help-row strong { color: var(--g-ink); font-weight: 800; letter-spacing: -.01em; }
.g-help-row small { font-size: 14px; color: var(--g-body); line-height: 1.5; }
.g-help-row__cat { font-size: 12.5px !important; font-weight: 700; color: var(--g-accent-deep) !important; text-transform: uppercase; letter-spacing: .06em; }
.g-help-row__icon { width: 34px; height: 34px; border-radius: 10px; background: var(--g-bg-2); color: var(--g-accent-deep); display: grid; place-items: center; flex: 0 0 auto; }
.g-help-row__go { color: var(--g-muted); align-self: center; }
.g-help-row--big { padding: 20px 22px; }
.g-help-row mark { background: var(--g-accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Article page ---------- */
.g-help-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.g-help-doc { display: grid; grid-template-columns: 250px minmax(0, 760px) 210px; gap: 48px; align-items: start; justify-content: center; padding-bottom: 72px; }
.g-help-side { position: sticky; top: 96px; }
.g-help-side__cat { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 800; color: var(--g-ink); text-decoration: none; }
.g-help-side__title { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--g-muted); }
.g-help-side__list { list-style: none; margin: 0; padding: 0 0 0 2px; border-left: 2px solid var(--g-line); display: grid; }
.g-help-side__list a { display: flex; align-items: center; gap: 8px; padding: 7px 12px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14.5px; line-height: 1.4; color: var(--g-body); text-decoration: none; }
.g-help-side__list a:hover { color: var(--g-ink); border-left-color: var(--g-line-2); }
.g-help-side__list a[aria-current="page"] { color: var(--g-accent-deep); font-weight: 800; border-left-color: var(--g-accent); }
.g-help-article__head { padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--g-line); }
.g-help-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--g-muted); }
.g-help-toc { display: none; margin: 0 0 28px; padding: 18px 22px; background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--g-radius); }
.g-help-toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--g-muted); margin-bottom: 8px; }
.g-help-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.g-help-toc a { color: var(--g-accent-deep); font-weight: 700; text-decoration: none; }

/* The body */
.g-help-body { font-size: 17px; line-height: 1.75; color: var(--g-ink-2); }
.g-help-body > * + * { margin-top: 1.1em; }
.g-help-body p { margin: 0; }
.g-help-body h2 { margin-top: 2em; font-size: 1.6rem; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; scroll-margin-top: 96px; }
.g-help-body h3 { margin-top: 1.6em; font-size: 1.22rem; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; scroll-margin-top: 96px; }
.g-help-body h2 + *, .g-help-body h3 + * { margin-top: .6em; }
.g-help-body a { color: var(--g-accent-deep); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.g-help-body strong { color: var(--g-ink); font-weight: 800; }
.g-help-body code { padding: 2px 6px; border-radius: 6px; background: var(--g-bg-2); font-size: .9em; }
.g-help-body ul, .g-help-body ol { margin: 0; padding-left: 1.4em; display: grid; gap: .45em; }
.g-help-body li::marker { color: var(--g-accent-deep); font-weight: 800; }
/* Numbered steps */
.g-help-body > ol { list-style: none; padding: 0; counter-reset: step; gap: 14px; }
.g-help-body > ol > li { position: relative; padding: 2px 0 2px 46px; counter-increment: step; }
.g-help-body > ol > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%;
    background: var(--g-ink); color: #fff; font-size: 14px; font-weight: 800; display: grid; place-items: center; }
/* Screenshots */
.g-help-shot { margin: 1.6em 0 !important; }
/* Shown at their own (half-pixel) size, never stretched; narrow ones centred */
.g-help-shot img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 16px; border: 1px solid var(--g-line-2); box-shadow: var(--g-shadow); background: var(--g-paper); }
.g-help-shot figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--g-muted); text-align: center; }
/* Callouts */
.g-help-note { display: grid; gap: .4em; padding: 16px 20px; border-radius: var(--g-radius); border: 1px solid var(--g-line); border-left-width: 4px; background: var(--g-paper); font-size: 16px; line-height: 1.6; }
.g-help-note > * { margin: 0 !important; }
.g-help-note--tip { background: var(--g-green-soft); border-color: #BBF7D0; border-left-color: var(--g-green); }
.g-help-note--note { background: var(--g-accent-soft); border-color: var(--g-accent-line); border-left-color: var(--g-accent); }
.g-help-note--important { background: var(--g-warn-soft); border-color: var(--g-warn-line); border-left-color: #D97706; color: var(--g-warn-ink); }
/* Tables */
.g-help-table { overflow-x: auto; border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-paper); }
.g-help-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.g-help-table th, .g-help-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--g-line); vertical-align: top; }
.g-help-table th { background: var(--g-bg-2); color: var(--g-ink); font-weight: 800; }
.g-help-table tr:last-child td { border-bottom: 0; }

/* FAQ */
.g-help-faq { margin-top: 48px; }
.g-help-faq h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.g-help-faq details { border-bottom: 1px solid var(--g-line-2); }
.g-help-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; font-size: 16.5px; font-weight: 800; color: var(--g-ink); }
.g-help-faq summary::-webkit-details-marker { display: none; }
.g-help-faq summary i { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--g-line-2); display: grid; place-items: center; flex: 0 0 auto; transition: transform .3s var(--g-ease), background .3s; }
.g-help-faq summary i .g-icon { --icon: 15px; }
.g-help-faq details[open] summary i { transform: rotate(45deg); background: var(--g-accent-fill); border-color: var(--g-accent-fill); color: var(--g-on-accent); }
.g-help-faq__a { padding: 0 40px 18px 0; line-height: 1.65; }
.g-help-faq__a p { margin: 0; }

/* Feedback */
.g-help-feedback { margin-top: 40px; padding: 20px 22px; border-radius: var(--g-radius); background: var(--g-paper); border: 1px solid var(--g-line); }
.g-help-feedback form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.g-help-feedback__q { font-weight: 800; color: var(--g-ink); margin-right: 8px; }
.g-help-vote { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--g-line-2); background: var(--g-bg); color: var(--g-ink); font: 700 15px var(--g-font); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.g-help-vote:hover { border-color: var(--g-ink); transform: translateY(-1px); }
.g-help-feedback form.g-help-feedback__why { display: grid; gap: 10px; }
.g-help-feedback__why label { font-weight: 700; color: var(--g-ink); }
.g-help-feedback__why .g-btn { justify-self: start; }
.g-help-feedback__done { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; color: var(--g-green); }

.g-help-related { margin-top: 44px; }
.g-help-related h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }

/* Still need help */
.g-help-still { padding: 0 0 clamp(56px, 8vw, 96px); }
.g-help-still__card { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; padding: 26px 28px; border-radius: var(--g-radius-lg); background: var(--g-paper); border: 1px solid var(--g-line); }
.g-help-still__card > div { flex: 1; min-width: 220px; }
.g-help-still__card h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.g-help-still__card p { margin: 4px 0 0; }
.g-help-still__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--g-accent-soft); color: var(--g-accent-deep); display: grid; place-items: center; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1280px) {
    .g-help-doc { grid-template-columns: 240px minmax(0, 1fr); }
    .g-help-side--toc { display: none; }
    .g-help-toc { display: block; }
}
@media (max-width: 1000px) {
    .g-help-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-help-doc, .g-help-split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .g-help-side { position: static; }
    .g-help-side--nav { order: 2; }
}
@media (max-width: 680px) {
    .g-help-cats, .g-help-list--grid { grid-template-columns: minmax(0, 1fr); }
    .g-help-search { flex-wrap: nowrap; padding-left: 14px; }
    .g-help-search__btn { padding: 0 14px; }
    .g-help-cathead { flex-direction: column; gap: 14px; }
    .g-help-body { font-size: 16.5px; }
    .g-help-body > ol > li { padding-left: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .g-help-cat, .g-help-row, .g-help-vote, .g-help-faq summary i { transition: none; }
}
