/* Help center article page (HELP-CENTER-PORT-PLAN-2026-10-23 G3): the v1
   three-column layout, topic nav, "On this page" rail and inline card, meta row,
   actions, permalinks, code frames, table strips, zoomable figures, pager,
   feedback card, "Keep reading", language switch and the article print rules
   (helpcanvas-v1 templates/kb/article.html.twig, _code_blocks, _lang_switch).
   Loaded on every help center page: every rule is scoped to .hc-art or a G3
   component class. Tokens come from help.css. */

/* ============ Layout ============ */
.hc-art-wrap { max-width: 1360px; }
/* The header and footer follow the article's wider wrap, so the logo lines up with the side nav and
   the search field with the rail (owner, 2026-11-06: the header read narrower than the content). */
.hc[data-page="article"] .hc-header-row, .hc[data-page="article"] .hc-footer-row { max-width: 1360px; }
/* Option A (owner, 2026-11-16: "everything is so tight"): the same three columns with wider gaps that
   grow with the window (40px at 1240, 72px from 1440), centred, and more room inside each column. */
.hc-art-layout {
  display: grid; grid-template-columns: 232px minmax(0, 680px); gap: clamp(40px, 5vw, 72px);
  padding: 28px 0 96px; align-items: start; justify-content: center;
}
.hc-art-layout.has-rail { grid-template-columns: 232px minmax(0, 680px) 232px; }
@media (max-width: 1239px) {
  .hc-art-layout, .hc-art-layout.has-rail { grid-template-columns: 232px minmax(0, 1fr); }
  .hc-art-rail { display: none; }
}
@media (max-width: 940px) {
  .hc-art-layout, .hc-art-layout.has-rail { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hc-art-side { display: none; }
}

/* Topic navigation (left) */
.hc-art-side { position: sticky; top: 88px; padding-top: 22px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; }
.hc a.hc-art-back { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; margin-bottom: 12px; padding-left: 12px; font-weight: 600; color: var(--muted); }
.hc a.hc-art-back:hover { color: var(--brand-deep); }
.hc a.hc-art-group { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 12px 10px; font-weight: 750; color: var(--ink); }
.hc-art-group svg { color: var(--brand-deep); }
.hc-art-siblings { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.hc-art-siblings a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--body); line-height: 1.4; font-weight: 500; }
.hc-art-siblings a:hover { color: var(--ink); background: var(--wash); }
.hc-art-siblings a[aria-current="page"] { color: var(--brand-ink); font-weight: 650; background: var(--mint); }
.hc-art-others { margin-top: 36px; }
.hc-art-others-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding-left: 12px; }
.hc-art-others a { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 6px 12px; border-radius: var(--r-sm); color: var(--muted); font-weight: 550; }
.hc-art-others a:hover { color: var(--ink); background: var(--wash); }

/* Article column */
.hc-art-col { min-width: 0; max-width: 680px; }
.hc-art-title { margin-top: 18px; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -.8px; color: var(--ink); font-weight: 800; overflow-wrap: break-word; hyphens: auto; }
.hc-art-meta { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin: 18px 0 0; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); }
.hc-art-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.hc-art-chip, .hc a.hc-art-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--r-pill); background: var(--mint); color: var(--brand-ink); font-weight: 650; font-size: 13px; }
.hc a.hc-art-chip:hover { color: var(--brand-deep); }
.hc-lang-note { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-md); font-size: 14px; background: color-mix(in srgb, var(--brand-ink) 8%, transparent); color: var(--body); }
.hc-lang-note a { font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
/* Copy link and Print: quiet text buttons at the end of the meta row. */
.hc-art-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.hc-art-action {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px;
  border: 0; border-radius: var(--r-sm); background: transparent;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.hc-art-action:hover { color: var(--brand-ink); background: var(--wash); }
@media (pointer: coarse) { .hc-art-action { min-height: 44px; } }

/* "On this page": inline card (below 1240px, sticky at 940px and below) and the rail */
.hc-toc { list-style: none; margin: 0; padding: 0; }
.hc-toc-inline { display: none; margin: 18px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); }
@media (max-width: 1239px) { .hc-toc-inline { display: block; } }
.hc-toc-inline summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px; font-size: 14px; font-weight: 650; color: var(--ink); cursor: pointer;
}
.hc-toc-inline summary::-webkit-details-marker { display: none; }
.hc-toc-inline summary svg { color: var(--muted); transition: transform .15s; }
.hc-toc-inline[open] summary svg { transform: rotate(180deg); }
.hc-toc-inline .hc-toc { padding: 4px 16px 12px; border-top: 1px solid var(--line-soft); max-height: 60vh; overflow-y: auto; }
.hc-toc-inline .hc-toc a { display: block; padding: 7px 0; font-size: 14px; color: var(--body); line-height: 1.4; }
.hc-toc-inline .hc-toc-l3 a { padding-left: 14px; }
.hc-toc-inline .hc-toc a[aria-current="location"] { color: var(--brand-ink); font-weight: 650; }
@media (max-width: 940px) {
  .hc-toc-inline { position: sticky; top: 64px; z-index: 50; background: color-mix(in srgb, var(--bg) 96%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
.hc-art-rail { position: sticky; top: 88px; padding-top: 26px; font-size: 14px; max-height: calc(100vh - 100px); overflow-y: auto; }
.hc-rail-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.hc-art-rail .hc-toc { border-left: 1px solid var(--line); }
.hc-art-rail .hc-toc a { display: block; margin-left: -1px; padding: 7px 12px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; font-size: 13px; }
.hc-art-rail .hc-toc a:hover { color: var(--ink); }
.hc-art-rail .hc-toc-l3 a { padding-left: 24px; }
.hc-art-rail .hc-toc a[aria-current="location"] { color: var(--brand-ink); font-weight: 650; border-left-color: var(--brand); }
/* v1 .rail-help: the compact help card under "On this page". */
.hc-rail-help { margin-top: 40px; padding: 0; }
.hc-art-rail .hc-rail-help:first-child { margin-top: 0; }
.hc-rail-help h2 { font-size: 14px; color: var(--ink); font-weight: 700; margin: 0 0 2px; line-height: 1.35; }
.hc-rail-help p { color: var(--muted); font-size: 13px; margin: 0 0 8px; line-height: 1.45; }
.hc-rail-help ul { list-style: none; margin: 0; padding: 0; }
.hc-art-rail .hc-rail-help li a, .hc-art-rail .hc-rail-help li button { display: flex; width: 100%; align-items: center; gap: 8px; min-height: 32px; padding: 4px 0; color: var(--brand-deep); font-size: 13px; font-weight: 600; line-height: 1.35; }
.hc-art-rail .hc-rail-help li a:hover, .hc-art-rail .hc-rail-help li button:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse) { .hc-art-rail .hc-rail-help li a, .hc-art-rail .hc-rail-help li button { min-height: 44px; } }

/* ============ Body ============ */
.hc-art-body { padding-top: 32px; }
/* More room between the parts of an article (option A). */
.hc .hc-art-prose > * { margin-bottom: 22px; }
.hc .hc-art-prose h2 { margin-top: 52px; margin-bottom: 14px; font-size: 24px; }
.hc .hc-art-prose h3 { margin-top: 36px; margin-bottom: 10px; }
.hc .hc-art-prose > h2:first-child, .hc .hc-art-prose > h3:first-child { margin-top: 0; }
.hc .hc-art-prose li { margin-bottom: .55em; }
/* ART-R3-1: .hc in front gives these rules the specificity of help.css '.hc .kb-prose h2' (0,2,1), and this file loads later, so they win.
   At 940px and below a heading lands under the sticky "On this page" bar (top 64px, 46px high). */
.hc .hc-art-prose h2, .hc .hc-art-prose h3 { position: relative; scroll-margin-top: 96px; }
@media (max-width: 940px) { .hc .hc-art-prose h2, .hc .hc-art-prose h3, .hc .hc-fb { scroll-margin-top: 128px; } }
.hc .hc-art-prose a.hc-anchor {
  position: absolute; left: -28px; top: 50%; transform: translateY(-50%);
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  color: var(--muted); font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none;
  opacity: 0; transition: opacity .12s;
}
.hc-art-prose h2:hover .hc-anchor, .hc-art-prose h3:hover .hc-anchor, .hc .hc-art-prose a.hc-anchor:focus-visible { opacity: 1; }
.hc .hc-art-prose a.hc-anchor:hover { color: var(--brand-deep); background: var(--mint); }
@media (max-width: 1000px), (hover: none) {
  .hc .hc-art-prose a.hc-anchor { position: static; transform: none; margin-left: 4px; vertical-align: middle; opacity: .75; }
}

/* Code frames (v1 _code_blocks): the bar holds the label, then Wrap and Copy from help-article.js */
.hc-art-prose .hc-code { margin: 0 0 20px; border-radius: 12px; overflow: hidden; background: var(--code-bg); color: var(--code-ink); border: 1px solid color-mix(in srgb, var(--code-ink) 14%, var(--code-bg)); }
.hc-code-bar {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 8px 6px 14px;
  background: var(--code-bar); border-bottom: 1px solid color-mix(in srgb, var(--code-ink) 16%, var(--code-bar));
  font-size: 12px; line-height: 1.2; color: #d1d5db;
}
.hc-code-label { font-family: var(--mono); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.hc-code-sp { flex: 1; }
.hc-code-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; min-width: 28px; padding: 0 10px;
  border: 1px solid #9ca3af; border-radius: 7px; background: transparent; color: #e5e7eb;
  font: inherit; font-size: 12px; font-weight: 600;
}
.hc-code-btn svg { width: 14px; height: 14px; }
.hc-code-btn:hover, .hc-code-btn[aria-pressed="true"], .hc-code-btn.is-done { background: #374151; color: #f9fafb; border-color: #e5e7eb; }
.hc .hc-code-btn:focus-visible { outline: 2px solid #f9fafb; outline-offset: 2px; }
@media (pointer: coarse) { .hc-code-btn { min-height: 44px; min-width: 44px; } .hc-code-bar { min-height: 52px; } }
.hc .hc-art-prose .hc-code pre {
  margin: 0; padding: 14px 16px; overflow-x: auto; border: 0; border-radius: 0;
  background: transparent; color: inherit; font-size: 13.5px; line-height: 1.6; tab-size: 2; white-space: pre;
}
.hc .hc-art-prose .hc-code pre:focus-visible { outline: 2px solid #f9fafb; outline-offset: -4px; }
.hc .hc-art-prose .hc-code.is-wrapped pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Tables: scroll strip with edge shadows, the swipe hint at 640px and below while it overflows */
.hc-tbl { margin: 0 0 20px; }
.hc-tbl-hint { display: none; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .hc-tbl-hint { display: flex; } .hc-tbl.fits .hc-tbl-hint { display: none; } }
.hc .hc-art-prose .hc-tbl-scroll {
  border-radius: 12px;
  background:
    linear-gradient(90deg, var(--card) 30%, transparent),
    linear-gradient(270deg, var(--card) 30%, transparent) 100% 0,
    radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 16%, transparent), transparent),
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 16%, transparent), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
  background-color: var(--card);
}
.hc .hc-art-prose .hc-tbl-scroll th, .hc .hc-art-prose .hc-tbl-scroll td { padding: 10px 14px; }

/* Figures: the image links to itself; help-article.js opens it in the zoom dialog */
.hc-art-prose .kb-figure { margin: 0 0 22px; }
.hc .hc-art-prose a.hc-zoom { position: relative; display: block; width: fit-content; max-width: 100%; margin-inline: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); cursor: zoom-in; text-decoration: none; }
/* Never stretched past its own size (owner, 2026-11-16: a cropped screenshot filled the column at 2.7x),
   and a tall one is held to 70% of the window; the zoom shows it larger. */
.hc .hc-art-prose a.hc-zoom img { display: block; width: auto; max-width: 100%; max-height: 70vh; height: auto; border: 0; border-radius: 0; }
.hc-zoom-hint {
  position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 7px; font-size: 13px; font-weight: 600; line-height: 1.3;
  background: color-mix(in srgb, var(--ink) 82%, transparent); color: var(--bg);
  opacity: 0; transition: opacity .15s;
}
.hc-zoom:hover .hc-zoom-hint, .hc-zoom:focus-visible .hc-zoom-hint { opacity: 1; }
@media (hover: none) { .hc-zoom-hint { opacity: 1; } }
/* The viewer fills the window: bar on top, the picture centred below it (owner, 2026-11-16). */
.hc-zoom-dialog { position: fixed; inset: 0; margin: 0; border: 0; padding: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #111318; color: #ffffff; overflow: hidden; }
.hc-zoom-dialog[open] { display: flex; flex-direction: column; }
.hc-zoom-dialog::backdrop { background: #111318; }
.hc-zoom-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex: none; font-size: 14px; line-height: 1.4; }
.hc-zoom-caption { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-zoom-tools { display: inline-flex; gap: 6px; flex: none; }
.hc-zoom-tools[hidden] { display: none; }
.hc-zoom-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgb(255 255 255 / .5); border-radius: 10px; background: transparent; color: #ffffff; cursor: pointer; }
.hc-zoom-btn:disabled { opacity: .4; cursor: default; }
.hc .hc-zoom-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.hc-zoom-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.hc-zoom-stage { box-sizing: border-box; display: grid; place-items: center; width: max-content; height: max-content; min-width: 100%; min-height: 100%; padding: 8px 16px 16px; }
.hc-zoom-dialog img { display: block; max-width: calc(100vw - 32px); max-height: calc(100vh - 90px); width: auto; height: auto; border-radius: 8px; background: #ffffff; cursor: zoom-in; }
.hc-zoom-dialog img[style] { max-width: none; max-height: none; }
.hc-zoom-dialog img.is-zoomed { cursor: zoom-out; }
.hc-zoom-close {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; flex: none;
  border: 1px solid rgb(255 255 255 / .5); border-radius: 10px; background: transparent; color: #ffffff;
  font-weight: 650; font-size: 14px;
}
.hc .hc-zoom-close:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

/* ============ After the body ============ */
.hc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
@media (max-width: 560px) { .hc-pager { grid-template-columns: 1fr; } }
.hc-pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: inherit; transition: border-color .15s, box-shadow .15s; }
.hc-pager a:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.hc-pager-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; color: var(--brand-deep); }
.hc-pager-title { display: block; margin-top: 2px; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.hc-pager-next { text-align: right; grid-column: 2; }
.hc-pager-next .hc-pager-label { justify-content: flex-end; }
@media (max-width: 560px) { .hc-pager-next { grid-column: auto; } }

.hc-fb { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); scroll-margin-top: 96px; }
.hc-fb-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hc-fb-text { min-width: 0; }
.hc-fb-q { font-size: 15px; font-weight: 650; color: var(--ink); }
.hc-fb-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.hc-fb-btns { margin: 0 0 0 auto; display: flex; gap: 8px; }
.hc-fb-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card);
  font-size: 14px; font-weight: 600; color: var(--body); transition: border-color .14s, background .14s, color .14s;
}
.hc-fb-btn:hover, .hc-fb-btn[aria-pressed="true"] { border-color: var(--brand); color: var(--brand-ink); background: var(--mint-soft); }
.hc-fb-btn[disabled] { cursor: progress; opacity: .75; }
@media (pointer: coarse) { .hc-fb-btn { min-height: 44px; } }
.hc-fb-status { margin-left: auto; display: none; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--brand-ink); }
.hc-fb-status svg { width: 17px; height: 17px; color: var(--brand-deep); }
.hc-fb.is-answered .hc-fb-btns { display: none; }
.hc-fb.is-answered .hc-fb-status { display: flex; }
@media (max-width: 480px) { .hc-fb-btns, .hc-fb-status { margin-left: 0; } }

.hc-related { margin-top: 40px; }
.hc-related h2 { font-size: 17px; color: var(--ink); font-weight: 750; letter-spacing: -.3px; margin-bottom: 12px; }
.hc-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .hc-related-grid { grid-template-columns: minmax(0, 1fr); } }
.hc-related-card, .hc a.hc-related-card {
  display: flex; flex-direction: column; min-width: 0; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: inherit;
  transition: border-color .16s, box-shadow .16s;
}
.hc-related-card:hover { border-color: color-mix(in srgb, var(--brand-ink) 24%, var(--bg)); box-shadow: var(--shadow-md); }
.hc-related-cat { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--brand-deep); overflow-wrap: anywhere; }
.hc-related-title { margin-top: 5px; font-size: 15px; color: var(--ink); font-weight: 680; line-height: 1.4; overflow-wrap: anywhere; }
.hc-related-rt { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ============ Language switch (header slot) ============ */
.hc-lang-menu { position: relative; }
.hc-lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 10px; border: 1px solid var(--header-line); border-radius: var(--r-md);
  font-size: 13px; font-weight: 650; color: var(--header-ink); white-space: nowrap;
}
.hc-lang-menu summary::-webkit-details-marker { display: none; }
.hc-lang-menu summary:hover { border-color: var(--header-muted); }
@media (pointer: coarse) { .hc-lang-menu summary { height: 44px; } }
.hc-lang-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 180px;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.hc-lang-menu-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 6px 10px; border-radius: 7px; font-size: 14px; color: var(--body); }
.hc-lang-menu-list a:hover { background: var(--mint-soft); color: var(--ink); }
.hc-lang-menu-list a[aria-current="true"] { font-weight: 650; color: var(--ink); }
.hc-lang-menu-list a svg { color: var(--brand-deep); }
@media (max-width: 980px) { .hc-lang-menu summary { padding: 0 8px; } }

@media (max-width: 420px) { .hc-art-layout { padding-bottom: 56px; } }

/* ============ Print: the article only ============ */
@media print {
  .hc-art-layout, .hc-art-layout.has-rail { display: block; padding: 0; }
  .hc-art-side, .hc-art-rail, .hc-rail-help, .hc-toc-inline, .hc-art-actions, .hc-pager, .hc-fb, .hc-related, .hc-contact, .hc-zoom-dialog, .hc-lang-menu { display: none !important; }
  .hc-art-col { max-width: none; }
  .hc-art-title { font-size: 20pt; }
  .hc .hc-art-prose a.hc-anchor, .hc-zoom-hint, .hc-tbl-hint, .hc-code-btn { display: none !important; }
  .hc .hc-art-prose a.hc-zoom { border: 0; background: none; }
  .hc .hc-art-prose a.hc-zoom::after { content: none !important; }
  .hc-art-prose .hc-code { background: none !important; color: #111827 !important; border: 1px solid #d1d5db; }
  .hc-code-bar { background: none !important; color: #4b5563 !important; border-bottom: 1px solid #d1d5db; }
  .hc .hc-art-prose .hc-code pre { white-space: pre-wrap !important; overflow: visible !important; border: 0 !important; background: none !important; }
  .hc .hc-art-prose .hc-tbl-scroll { background: none !important; }
}
