/* The Help center (help/). The search at the top and the topic cards are here; the
   answers use the legal pages' reading layout (legal.css), with its contents list that
   marks the section you're reading (legal.js). help.js runs the search. */

.hc { width: min(1100px, calc(100% - 32px)); margin: 0 auto 120px; }

/* ---------- the top: headline and search ---------- */
.hc-head { padding: clamp(56px, 8vw, 96px) 0 0; text-align: center; }
.hc-title .l1 { font-size: clamp(46px, 7vw, 92px); }
.hc-title .l2 { font-size: clamp(34px, 5.4vw, 68px); }

.hc-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 620px;
  margin: 40px auto 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 40px -24px rgba(91, 43, 224, 0.45);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hc-search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(91, 43, 224, 0.12), 0 14px 40px -24px rgba(91, 43, 224, 0.45); }
.hc-search svg { position: absolute; left: 18px; width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.hc-search input {
  flex: 1;
  min-width: 0;
  height: 60px;
  padding: 0 52px 0 52px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--ink);
  font: 400 17px/1.2 var(--body);
  outline: none;
}
.hc-search input::placeholder { color: #9A93B5; }
.hc-search input::-webkit-search-cancel-button { display: none; }
.hc-search kbd { position: absolute; right: 16px; padding: 3px 9px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; background: var(--bg); color: var(--muted); font: 600 13px/1.2 var(--body); }
.hc-search:focus-within kbd { opacity: 0; }

/* results, as you type */
.hc-head { position: relative; z-index: 5; }
.hc-results { /* floats over the page below the search, instead of pushing it down */
  position: absolute;
  left: 0;
  right: 0;
  max-width: 620px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  margin: 10px auto 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 50px -30px rgba(27, 21, 48, 0.35);
  text-align: left;
}
.hc-count { margin: 6px 12px 8px; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.hc-hit { display: block; padding: 12px 14px; border-radius: 11px; color: var(--ink); text-decoration: none; transition: background 0.12s; }
.hc-hit:hover, .hc-hit:focus-visible { background: var(--lilac); outline: none; }
.hc-hit b { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }
.hc-hit small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--violet); }
.hc-hit span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: #3E3858; }
.hc-results mark { padding: 0 2px; border-radius: 3px; background: rgba(91, 43, 224, 0.16); color: inherit; }
.hc-none { margin: 10px 12px; font-size: 15px; line-height: 1.55; color: #3E3858; }
.hc-none a { color: var(--violet); }

/* ---------- topic cards ---------- */
.hc-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 64px; }
.hc-topics a {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.5, 0.64, 1), border-color 0.15s, box-shadow 0.25s;
}
.hc-topics svg { width: 44px; height: 44px; margin-bottom: 12px; padding: 10px; border-radius: 13px; background: var(--lilac); fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: background 0.2s, stroke 0.2s; }
.hc-topics b { font-size: 16px; font-weight: 600; line-height: 1.3; }
.hc-topics span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.hc-topics a:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hc-topics a:hover { transform: translateY(-3px); border-color: #CDBBFF; box-shadow: 0 18px 36px -22px rgba(91, 43, 224, 0.55); }
  .hc-topics a:hover svg { background: var(--violet); stroke: #fff; }
}

/* ---------- the answers ---------- */
.hc-body { margin-top: 88px; }
.hc-text section + section { margin-top: 64px; }
.hc-text section > h2 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 4px; }
.hc-q { padding: 22px 0 6px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.hc-q:last-child { border-bottom: 0; }
.hc-q h3 { margin: 0 0 8px; font: 600 19px/1.35 var(--body); color: var(--ink); }
.hc-q:target { animation: hc-found 2.2s ease; border-radius: 12px; }
@keyframes hc-found { 0%, 40% { background: rgba(91, 43, 224, 0.08); box-shadow: 0 0 0 12px rgba(91, 43, 224, 0.08); } }
.hc-text code { padding: 2px 7px; border-radius: 6px; background: var(--lilac); color: var(--violet-hover); font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* the three moves, numbered in violet */
.hc-steps { margin: 4px 0 14px; padding: 0; list-style: none; counter-reset: step; }
.hc-steps li { position: relative; padding-left: 40px; counter-increment: step; }
.hc-steps li + li { margin-top: 10px; }
.hc-steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; font-size: 14px; font-weight: 600; }

/* the five sizes, drawn to shape */
.hc-sizes { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 22px; margin: 10px 0 18px; }
.hc-sizes span { display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); text-align: center; }
.hc-sizes span::before { content: ""; width: var(--w); aspect-ratio: var(--r); border: 2px solid var(--violet); border-radius: 6px; background: linear-gradient(160deg, var(--lilac), #fff); order: -1; }
.hc-sizes small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }

/* still stuck */
.hc-more { margin-top: 64px; padding: clamp(24px, 3.5vw, 34px); border-radius: 24px; background: var(--lilac); border: 1px solid #DDD3FB; }
.hc-more h2 { margin: 0 0 8px; }
.hc-more p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .hc-q:target { animation: none; background: rgba(91, 43, 224, 0.06); }
}

/* ---------- tablets and phones ---------- */
@media (max-width: 1023px) {
  .hc { margin-bottom: 96px; }
  .hc-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-body { margin-top: 72px; }
}
@media (max-width: 640px) {
  .hc-search input { height: 54px; font-size: 16px; } /* 16px: phones don't zoom in on it */
  .hc-search kbd { display: none; }
  .hc-search input { padding-right: 16px; }
  .hc-topics { gap: 10px; margin-top: 44px; }
  .hc-topics a { padding: 16px 14px; border-radius: 16px; }
  .hc-topics svg { width: 38px; height: 38px; padding: 8px; margin-bottom: 8px; }
  .hc-topics b { font-size: 15px; }
  .hc-topics span { font-size: 13px; }
  .hc-q h3 { font-size: 18px; }
  .hc-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; } /* three, then two: even rows */
}
