/* PRD-189 / PRD-190 help centre. Layout: UX-190; prototype: design-system/web/Help*.html. */
.help-page{padding-block:var(--s-8)}
/* Author display rules must not defeat the `hidden` attribute the search module and the Worker rely on. */
.help-page [hidden]{display:none!important}
.help-head{display:grid;gap:18px}
.help-head h1{font:500 12px/1.3 var(--font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3)}
.help-line{font:400 clamp(40px,5vw,72px)/1.05 var(--font-display);letter-spacing:-.02em;hyphens:auto;overflow-wrap:anywhere}

/* Search: the module builds the form into the slot. With scripting on the slot already holds the field's height, so attaching never shifts the grid. */
.help-search-slot{max-width:640px;margin:var(--s-6) 0 0}
@media (scripting:enabled){.help-search-slot{min-height:112px}}
.help-search{display:grid;gap:var(--s-2)}
.help-search label{font:500 14px/1.4 var(--font-ui);color:var(--ink-2)}
.help-search-pill{position:relative;scroll-margin-top:8px}/* the shell's scroll-padding-top (68px) adds the header offset */
.help-search input{width:100%;min-height:48px;padding:0 56px 0 var(--s-4);font:400 17px/1.4 var(--font-ui);border:1px solid var(--hairline);border-radius:var(--r-3);background:var(--paper);color:var(--ink)}
.help-search input{-webkit-appearance:none;appearance:none}
/* --muted is the guidelines' tertiary/helper text role: 5.0:1 on --paper (AA body). Firefox lowers placeholder opacity by default. */
.help-search input::placeholder{color:var(--muted);opacity:1}
/* The native clear icon is off-palette blue; the custom clear button replaces it so its size and name are controlled. */
.help-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.help-search input:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
[data-help-search-clear]{position:absolute;inset-block-start:2px;inset-inline-end:2px;width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:var(--r-3);background:transparent;color:var(--ink);cursor:pointer}
[data-help-search-clear] span{position:relative;width:16px;height:16px}
[data-help-search-clear] span::before,[data-help-search-clear] span::after{content:"";position:absolute;inset-block-start:7px;inset-inline:0;height:2px;background:currentColor;border-radius:1px}
[data-help-search-clear] span::before{transform:rotate(45deg)}
[data-help-search-clear] span::after{transform:rotate(-45deg)}
[data-help-search-clear]:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
.help-search-status{min-height:1.4em;margin-top:var(--s-2);font:400 14px/1.4 var(--font-ui);color:var(--ink-2)}

/* Category grid: stretched rows keep the closed grid even; an open card grows its row, nothing moves sideways. */
.help-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:var(--s-7)}
.help-card{align-content:start;display:grid;scroll-margin-top:16px;padding:var(--s-6) 28px;border:1px solid var(--hairline);border-radius:var(--r-5);background:var(--glass-1-bg)}
.help-card h2{font:400 clamp(28px,3vw,36px)/1.1 var(--font-display);overflow-wrap:anywhere}
.help-count{margin-top:var(--s-2);font:500 12px/1.4 var(--font-mono);letter-spacing:.08em;color:var(--ink-3)}
.help-card ul,.help-results{list-style:none;padding:0;margin:var(--s-3) 0 0;display:grid;gap:0}
.help-card a,.help-sidebar a{display:flex;align-items:center;min-height:44px;color:var(--ink);text-decoration:none;overflow-wrap:anywhere}
.help-card a:hover,.help-sidebar a:hover,.help-side-all:hover{text-decoration:underline}
.help-card details ul{margin-top:0}
.help-card summary{display:flex;align-items:center;gap:var(--s-2);min-height:44px;padding-inline:0;list-style:none;cursor:pointer;font:600 15px/1.3 var(--font-ui);color:var(--ink)}
.help-card summary::-webkit-details-marker{display:none}
.help-card summary:hover{text-decoration:underline}
.help-card summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px;border-radius:var(--r-1)}
.help-card summary::after{content:"";width:8px;height:8px;margin-top:-4px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);flex:none}
.help-card details[open] summary::after{margin-top:4px;transform:rotate(-135deg)}
.help-page a:focus-visible{outline:2px solid var(--ink);outline-offset:2px;border-radius:var(--r-1)}
.help-index-contact{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s-4);margin-top:var(--s-9);padding-top:var(--s-7);border-top:1px solid var(--hairline)}
.help-index-contact p{font:400 clamp(24px,2.4vw,32px)/1.2 var(--font-display)}
.help-index-contact .btn{min-height:44px}
.help-contact a{color:var(--ink);text-decoration:underline}
.help-rejected{margin-top:var(--s-6)}

/* Results replace the grid in place: one column, hairline rows, whole row is the hit area (bounded stretched link). */
[data-help-results-region]{min-height:70svh;max-width:720px;margin-top:var(--s-4)}
.help-results{margin:0}
.help-results li{position:relative;padding:var(--s-4) 0;border-bottom:1px solid var(--hairline)}
.help-results a{display:block;min-height:0;font:600 18px/1.3 var(--font-ui);color:var(--ink);text-decoration:none;overflow-wrap:anywhere}
.help-results a::after{content:"";position:absolute;inset:0}
.help-results a:hover{text-decoration:underline}
.help-results a:focus-visible{outline:none;box-shadow:none}
.help-results li:has(a:focus-visible){outline:2px solid var(--ink);outline-offset:-2px;border-radius:var(--r-2)}
.help-result-category{margin-top:var(--s-1);font:500 12px/1.4 var(--font-mono);letter-spacing:.08em;color:var(--ink-3)}
.help-result-description{margin-top:var(--s-2);color:var(--ink-2);font-size:15px}
[data-help-none]{margin-top:var(--s-4)}

/* Article: head (start-aligned), then the reading column and the sidebar. */
.help-article-head{max-width:none;margin:0 0 var(--s-7);padding:0;text-align:start;justify-items:start}
.help-article-head h1{font-size:clamp(40px,5vw,72px);line-height:1.05;max-width:880px}
.help-article-head .article-crumbs{justify-content:flex-start}
.help-meta{justify-content:flex-start;gap:6px var(--s-2)}
.help-with-side{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.help-body{min-width:0}
.help-body .article-prose{margin-inline:0}
.help-body .article-prose ol{list-style:none;counter-reset:step;padding-left:0}
.help-body .article-prose ol>li{position:relative;counter-increment:step;padding-left:2.4em;min-height:1.8em}
.help-body .article-prose ol>li::before{content:counter(step);position:absolute;inset-inline-start:0;top:.1em;display:grid;place-items:center;width:1.7em;height:1.7em;border-radius:50%;background:var(--ink);color:var(--paper);font:600 .8em/1 var(--font-ui)}
.article-prose .tip{padding:24px 28px;border-radius:var(--r-4);border:1px solid var(--hairline);background:var(--glass-1-bg);font-size:17px;margin-block:1.8em}
.tip>*+*{margin-top:.8em}
.tip-h{font:600 17px/1.3 var(--font-ui);color:var(--ink);margin:0}
.article-prose .tip .tip-h{margin-top:0}
.help-foot{max-width:var(--reading-width,680px);margin-top:var(--s-9)}
.help-helpful{padding:var(--s-5) var(--s-6);border-radius:var(--r-4);border:1px solid var(--hairline);background:var(--glass-2-bg)}
.help-feedback fieldset{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center}
.help-feedback fieldset[hidden]{display:none}
.help-feedback legend{float:left;margin-inline-end:var(--s-5);font:600 16px/1.4 var(--font-ui);padding:0}
.help-feedback .btn{min-height:44px;min-width:96px}
.help-feedback [data-help-feedback]:not([hidden]){margin-top:var(--s-3)}
.help-foot .help-contact{margin-top:var(--s-5);font-size:16px;color:var(--ink-2)}

.help-sidebar{margin-top:var(--s-8);padding-top:40px;border-top:1px solid var(--hairline)}
.help-sidebar h2{font:500 12px/1.3 var(--font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3)}
.help-sidebar ul{list-style:none;padding:0;margin:var(--s-3) 0 0;display:grid;gap:0}
.help-sidebar a[aria-current]{text-decoration:underline;text-underline-offset:4px;font-weight:600}
.help-side-all{display:flex;align-items:center;min-height:44px;margin-top:var(--s-2);color:var(--ink);text-decoration:none}

@media (max-width:960px){
  .help-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:620px){
  .help-grid{grid-template-columns:1fr}
  .help-card{padding:var(--s-5) var(--s-5)}
  .article-prose .tip{padding:20px 16px}
  .help-foot{margin-top:40px}
  .help-sidebar{padding-top:32px}
  .help-feedback legend{float:none;margin-bottom:var(--s-3)}
}
/* Two columns from 1024px: the sidebar sits left of the article but stays after it in the DOM, so the answer comes first. */
@media (min-width:1024px){
  .help-with-side{grid-template-columns:240px minmax(0,680px);grid-template-areas:"side body";gap:clamp(32px,6vw,96px)}
  .help-body{grid-area:body}
  .help-sidebar{grid-area:side;margin-top:0;padding-top:0;border-top:0}
}
@media (min-width:1024px) and (pointer:fine){
  .help-sidebar a,.help-side-all{min-height:24px}
  .help-sidebar ul{gap:12px}
}
/* Sticky only where the sidebar's own column exists and a tall sidebar cannot outgrow the viewport. */
@media (min-width:1024px) and (min-height:640px){
  .help-sidebar{position:sticky;top:96px;align-self:start}
}
.help-body .article-prose>:first-child{margin-top:0}
