/* English /help hub, Ink and Lime (Vytas, 2026-11-03). Template: frontend/help/help_ink.pug. Loads after ink/home.css,
   which owns the tokens, header, hero, FAQ and close. This file holds only this page's parts (hp-*).
   Layout follows the page type (INK-SYSTEM.md section 6): search first, then every guide title visible at once by topic.
   No switcher, no mock pictures. Motion plays once. */

html body.ik:not(#_) .hp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body.ik.ikhp:not(#_) [hidden] { display: none !important; }

/* ---------- Hero: search on the left, the four most common problems on the right. Short, so the guides start on the first screen. ---------- */
html body.ik:not(#_) .hp-hero { align-items: center; min-height: 0; padding-bottom: var(--ik-y); }
html body.ik:not(#_) .hp-search { position: relative; z-index: 6; width: 100%; max-width: 560px; margin-top: 28px; }
html body.ik:not(#_) label.hp-search__box { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border-radius: 12px; background: #fff; color: var(--cf-text-3); cursor: text; }
html body.ik:not(#_) .hp-search__box input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--cf-text); }
html body.ik:not(#_) .hp-search__box input::placeholder { color: #6b6b72; opacity: 1; }
html body.ik:not(#_) .hp-search__box input::-webkit-search-cancel-button { cursor: pointer; }
html body.ik:not(#_) label.hp-search__box:focus-within { outline: 2px solid var(--cf-lime); outline-offset: 2px; }
html body.ik:not(#_) .hp-search__res { position: absolute; top: calc(58px + 8px); left: 0; right: 0; padding: 6px; border: 1px solid var(--cf-line); border-radius: 16px; background: #fff; text-align: left; }
html body.ik:not(#_) .hp-search__res a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--cf-text); text-decoration: none; }
html body.ik:not(#_) .hp-search__res b { font-size: 15px; font-weight: 500; line-height: 1.3; }
html body.ik:not(#_) .hp-search__res i { font-size: 13px; font-style: normal; color: var(--cf-text-3); }
html body.ik:not(#_) .hp-search__res a:is(:hover, :focus-visible) { background: var(--cf-mist); outline: none; }
html body.ik:not(#_) p.hp-search__none { padding: 10px 12px; font-size: 15px; line-height: 1.5; color: var(--cf-text-2); }
html body.ik:not(#_) p.hp-search__none a { color: var(--cf-text); text-decoration: underline; text-underline-offset: 3px; }
html body.ik:not(#_) p.hp-tries { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--cf-on-ink-2); }
html body.ik:not(#_) p.hp-tries > span { margin-right: 2px; }
html body.ik:not(#_) button.hp-try { appearance: none; min-height: 36px; margin: 0; padding: 0 14px; border: 1px solid #4a4a50; border-radius: 999px; background: transparent; font: inherit; font-size: 14px; color: var(--cf-on-ink); cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
@media (hover: hover) { html body.ik:not(#_) button.hp-try:hover { border-color: #6b6b72; background: var(--cf-ink-2); } }
html body.ik:not(#_) button.hp-try:focus-visible { outline: 2px solid var(--cf-lime); outline-offset: 2px; }
/* Search works in the browser only. Without it every guide title is still listed below. */
html:not(.ik-js) body.ik:not(#_) .hp-search { display: none; }

/* The problems card: a white card with rows, no picture. */
html body.ik:not(#_) .hp-fix { justify-self: end; width: 100%; max-width: 540px; padding: 8px; border-radius: 28px; background: #fff; color: var(--cf-text); }
html body.ik:not(#_) .hp-fix__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 18px 8px; }
html body.ik:not(#_):not(#_) [role="main"] h2.hp-fix__h { font-size: 15px !important; font-weight: 600 !important; letter-spacing: 0; color: var(--cf-text); }
html body.ik:not(#_) .hp-fix__top a { font-size: 14px; font-weight: 500; color: var(--cf-text-2); text-decoration: underline; text-underline-offset: 3px; }
html body.ik:not(#_) .hp-fix__list li + li { border-top: 1px solid #f0f0f2; }
html body.ik:not(#_) .hp-fix__list a { display: flex; align-items: center; gap: 16px; padding: 16px 12px 16px 18px; border-radius: 20px; color: var(--cf-text); text-decoration: none; transition: background-color .2s var(--ease); }
html body.ik:not(#_) .hp-fix__list a > span:first-child { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
html body.ik:not(#_) .hp-fix__list b { font-size: 17px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
html body.ik:not(#_) .hp-fix__list i { font-size: 14px; font-style: normal; line-height: 1.45; color: var(--cf-text-2); }
html body.ik:not(#_) .hp-go { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--cf-line); border-radius: 50%; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
@media (hover: hover) {
  html body.ik:not(#_) .hp-fix__list a:hover { background: var(--cf-mist); }
  html body.ik:not(#_) .hp-fix__list a:hover .hp-go { border-color: var(--cf-lime); background: var(--cf-lime); }
}
html body.ik:not(#_) .hp-fix__list a:focus-visible { outline: 2px solid var(--cf-ink); outline-offset: -2px; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes hpUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  html body.ik:not(#_) .hp-fix { animation: hpUp .9s var(--ease-out) .25s both; }
}

/* ---------- Every guide by topic: one white panel per topic, the topic name on the left, all its guide titles on the right ---------- */
html body.ik:not(#_) .hp-dir { display: grid; gap: 12px; }
html body.ik:not(#_) .hp-topic { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px; padding: 8px; border-radius: 28px; background: #fff; color: var(--cf-text); }
html body.ik:not(#_) .hp-topic__side { padding: 14px 0 14px 20px; }
html body.ik:not(#_) .hp-topic h3.ik-h3 { font-size: 21px; color: var(--cf-text); }
html body.ik:not(#_) .hp-topic h3.ik-h3 a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
html body.ik:not(#_) .hp-topic h3.ik-h3 svg { flex: none; color: var(--cf-text-3); transition: transform .2s var(--ease), color .2s; }
@media (hover: hover) {
  html body.ik:not(#_) .hp-topic h3.ik-h3 a:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
  html body.ik:not(#_) .hp-topic h3.ik-h3 a:hover svg { transform: translateX(3px); color: currentColor; }
}
html body.ik:not(#_) p.hp-topic__n { margin-top: 6px; font-size: 14px; color: var(--cf-text-3); }
html body.ik:not(#_) ul.hp-topic__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; align-content: start; }
html body.ik:not(#_) ul.hp-topic__list li:nth-child(n + 3) { border-top: 1px solid #f0f0f2; }
html body.ik:not(#_) .hp-topic__list a { display: flex; align-items: center; gap: 16px; min-height: 52px; padding: 9px 16px; border-radius: 16px; font-size: 16px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; color: var(--cf-text); text-decoration: none; transition: background-color .2s var(--ease); }
html body.ik:not(#_) .hp-topic__list a > span { flex: 1; min-width: 0; }
html body.ik:not(#_) .hp-topic__list a > svg { flex: none; color: var(--cf-text-3); transition: transform .2s var(--ease), color .2s; }
@media (hover: hover) {
  html body.ik:not(#_) .hp-topic__list a:hover { background: var(--cf-mist); }
  html body.ik:not(#_) .hp-topic__list a:hover > svg { transform: translateX(3px); color: currentColor; }
}
html body.ik:not(#_) .hp-topic :is(a):focus-visible { outline: 2px solid var(--cf-ink); outline-offset: -2px; }

/* ---------- FAQ on an ink band: the homepage rows in their ink colours ---------- */
html body.ik:not(#_) .hp-faq .ik-faq { border-top-color: var(--cf-ink-line); }
html body.ik:not(#_) .hp-faq .ik-faq details { border-bottom-color: var(--cf-ink-line); }
html body.ik:not(#_) .hp-faq .ik-faq summary { color: var(--cf-on-ink); }
html body.ik:not(#_) .hp-faq .ik-faq p { color: var(--cf-on-ink-2); }
html body.ik:not(#_) .hp-faq .ik-faq__ico { background: var(--cf-ink-2); color: var(--cf-on-ink); }
html body.ik:not(#_) .hp-faq .ik-faq details[open] .ik-faq__ico { background: var(--cf-lime); color: var(--cf-ink); }
html body.ik:not(#_) .hp-faq .ik-faq summary:focus-visible { outline: 2px solid var(--cf-lime); outline-offset: 2px; }
html body.ik:not(#_) p.hp-also { margin-top: 24px; font-size: 15px; line-height: 1.6; color: var(--cf-on-ink-2); }
html body.ik:not(#_) p.hp-also a { color: var(--cf-on-ink); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { html body.ik:not(#_) p.hp-also a:hover { text-decoration-thickness: 2px; } }

/* ---------- Close: what to put in a chat message, on a white card straight on the lime ---------- */
html body.ik:not(#_) .hp-ask { padding: 24px 26px; border-radius: 24px; background: #fff; color: var(--cf-ink); }
html body.ik:not(#_) p.hp-ask__h { margin-bottom: 8px; font-size: 15px; font-weight: 600; }
html body.ik:not(#_) .hp-ask li { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 16px; line-height: 1.4; }
html body.ik:not(#_) .hp-ask li + li { border-top: 1px solid #f0f0f2; }
html body.ik:not(#_) .hp-ask__ico { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--cf-ink); color: var(--cf-lime); }

/* On help pages the chat card is content, not a picture: home.css hides .ik-close__art on phones, so show it here, under the buttons. */
@media (max-width: 767px) {
  html body.ik:is(.ikhp, .ikhg, .ikht):not(#_) .ik-close__art { display: block; justify-self: stretch; width: 100%; margin: 0; padding: 0; }
  html body.ik:is(.ikhp, .ikhg, .ikht):not(#_) .hp-ask { padding: 18px 18px; border-radius: 20px; }
}

/* ---------- Tablets and phones ---------- */
@media (max-width: 1099px) {
  html body.ik:not(#_) .hp-search { align-self: center; }
  html body.ik:not(#_) p.hp-tries { justify-content: center; }
  html body.ik:not(#_) .hp-fix { justify-self: center; }
}
/* The topic name moves above its guides; the guides stay in two columns while they fit. */
@media (max-width: 899px) {
  html body.ik:not(#_) .hp-topic { grid-template-columns: minmax(0, 1fr); gap: 0; }
  html body.ik:not(#_) .hp-topic__side { padding: 16px 16px 10px; }
}
@media (max-width: 639px) {
  html body.ik:not(#_) ul.hp-topic__list { grid-template-columns: minmax(0, 1fr); }
  /* One column: a line above every guide but the first. nth-child, not li + li, so it outranks the two-column rule above. */
  html body.ik:not(#_) ul.hp-topic__list li:nth-child(n + 2) { border-top: 1px solid #f0f0f2; }
}
@media (max-width: 767px) {
  html body.ik:not(#_) .hp-search { margin-top: 24px; }
  html body.ik:not(#_) label.hp-search__box { height: 54px; }
  html body.ik:not(#_) .hp-search__res { top: calc(54px + 8px); }
  html body.ik:not(#_) .hp-fix { padding: 6px; border-radius: 24px; }
  html body.ik:not(#_) .hp-fix__top { padding: 14px 14px 6px; }
  html body.ik:not(#_) .hp-fix__list a { gap: 12px; padding: 14px 8px 14px 14px; border-radius: 18px; }
  html body.ik:not(#_) .hp-fix__list b { font-size: 16px; }
  html body.ik:not(#_) .hp-topic { padding: 6px; border-radius: 24px; }
  html body.ik:not(#_) .hp-topic__side { padding: 14px 12px 8px; }
  html body.ik:not(#_) .hp-topic h3.ik-h3 { font-size: 20px; }
  html body.ik:not(#_) .hp-topic__list a { min-height: 52px; padding: 10px 12px; border-radius: 14px; font-size: 15px; }
}

/* A longer translated panel title and link share one row; on phones the link may move under the title (2026-11-07). */
@media (max-width: 480px) { html:not([lang^="en"]) body.ik:not(#_) .hp-fix__top { flex-wrap: wrap; row-gap: 2px; } }
