/* werk help over the portal's own stylesheet (portal.css, its styles.css as it is): only what the
   portal has no rule for, in the portal's tokens: the home's opening, the search, the topics, an
   entry's text and its steps */
/* an anchor lands below the portal's sticky header (64px, 56px narrower) */
html {
  scroll-padding-top: 80px;
}
@media (max-width: 1023px) {
  html {
    scroll-padding-top: 72px;
  }
  /* the header's own link reaches the phone's 44px by padding, its place kept */
  .hd a.sec {
    padding: 12px 8px;
    margin: -12px -8px;
  }
}
.hd a.sec {
  color: var(--fg);
  text-decoration: none;
}
.hd a.sec:active {
  color: var(--mut);
}
/* the phone menu's foot holds the light and dark switch alone, at the end where the portal has it;
   without script the switch is not drawn, and so neither is its foot */
.navp-f {
  justify-content: flex-end;
}
html:not(.js) .navp-f {
  display: none;
}

/* the side list: each topic's count, and the topic read on the home */
.nv .n {
  margin-left: auto;
  font-size: 12px;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
}
.nv.here {
  background: var(--fill2);
  color: var(--fg);
  font-weight: 500;
}

/* the home's opening: asking werk is the quickest way, in a soft panel of the brand's tone */
.ask {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--acc) 7%, var(--bg));
  font-size: 15px;
  line-height: 24px;
  color: var(--fg2);
}
.ask-i {
  flex: none;
  color: var(--acc);
  padding-top: 1px;
}
.ask p + p {
  margin-top: 4px;
}
.ask .ask-t {
  font-weight: 600;
  color: var(--fg);
}
.ask .ask-m {
  color: var(--mut);
}

/* a topic on the home, as apple support draws one: a small icon, its name and what it holds,
   then its articles as a light list */
.topic {
  margin-top: 56px;
}
.th {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.ti {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--acc) 10%, var(--bg));
  color: var(--acc);
}
.th h2.h {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
}
.tl {
  margin-top: 4px;
  font-size: 15px;
  line-height: 24px;
  color: var(--fg2);
}

/* the light lists of articles (the most needed, a topic's, the related ones): a title with its
   chevron beside it and one line of what it holds, between thin dividers; two columns where the
   page is wide enough for two lines of reading width */
.arts {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.arts li {
  border-top: 1px solid var(--line);
}
.arts li:last-child {
  border-bottom: 1px solid var(--line);
}
.art {
  display: block;
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
}
.art:hover {
  background: var(--bg2);
}
.art:active {
  background: var(--fill);
}
.art .at {
  font:
    550 16px / 24px Inter,
    sans-serif;
}
.art .at .ic {
  display: inline-block;
  margin-left: 4px;
  vertical-align: -2px;
  color: var(--mut);
  transition: transform 0.15s ease;
}
.art:hover .at .ic {
  transform: translateX(2px);
  color: var(--acc);
}
.art .as {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 21px;
  color: var(--mut);
}
.pop .arts {
  margin-top: 12px;
}
@container main (min-width: 760px) {
  .home .arts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }
  .home .arts li:nth-last-child(2):nth-child(odd) {
    border-bottom: 1px solid var(--line);
  }
}

/* an entry: its lede over its text, at a reading width, its steps as a numbered block */
.doc .lead,
.hb {
  max-width: 68ch;
}
.doc .lead {
  font-size: 19px;
  line-height: 30px;
  color: var(--fg);
}
.hb {
  font-size: 17px;
  line-height: 29px;
  color: var(--fg2);
}
.hb p,
.hb ul {
  margin-top: 16px;
}
.hb ul {
  padding: 0 0 0 22px;
}
.hb ul li {
  margin: 6px 0;
}
.hb strong,
.hs strong {
  font-weight: 600;
  color: var(--fg);
}
.hb ol,
.hs {
  list-style: none;
  counter-reset: step;
  max-width: 68ch;
  margin: 16px 0 0;
  padding: 4px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg2);
  font-size: 16px;
  line-height: 24px;
  color: var(--fg2);
}
.hs + .hs {
  margin-top: 12px;
}
.hb ol li,
.hs li {
  counter-increment: step;
  position: relative;
  padding: 10px 16px 10px 52px;
}
.hb ol li + li,
.hs li + li {
  border-top: 1px solid var(--line);
}
.hb ol li::before,
.hs li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font:
    600 13px / 24px Inter,
    sans-serif;
  text-align: center;
}
.askf {
  max-width: 68ch;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 24px;
  color: var(--mut);
}
@media (max-width: 640px) {
  .doc .lead {
    font-size: 17px;
    line-height: 27px;
  }
  .hb {
    font-size: 16px;
    line-height: 27px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .art .at .ic {
    transition: none;
  }
}
