/* Scoped documentation layout: the rest of the application keeps its own styles. */
.help-centre { --help-line: #dce4ee; --help-muted: #53647c; --help-accent: #1854c4; min-width: 0; }
.help-centre .page-hero { padding-bottom: 1.8rem; margin-bottom: 0; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--help-line); border-radius: 18px; background: #fff; overflow: clip; margin-bottom: 2rem; }
.help-sidebar { display: none; }
.help-enhanced .help-sidebar { display: block; background: #f7f9fc; border-bottom: 1px solid var(--help-line); padding: .75rem; min-width: 0; }
.help-nav-label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--help-muted); padding: 1rem .75rem .5rem; margin: 0; }
.help-topic-link, .help-subtopics a { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem; min-height: 44px; border-radius: 8px; color: #293b53; text-decoration: none; font-size: .9rem; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.help-topic-link > i:first-child { color: var(--help-accent); width: 1.1rem; flex: 0 0 1.1rem; margin-top: .2rem; }
.help-topic-link > i:last-child:not(:first-child) { margin-left: auto; font-size: .65rem; margin-top: .35rem; }
.help-topic-link:hover, .help-subtopics a:hover { background: #eaf0f8; color: #174ca6; }
.help-topic-link.is-active { background: #e5edff; color: #1648a0; box-shadow: inset 3px 0 #2563eb; }
.help-subtopics { margin: .3rem .4rem .6rem 1.25rem; border-left: 1px solid #cbd7e8; padding-left: .4rem; }
.help-subtopics a { font-size: .82rem; font-weight: 500; gap: .5rem; padding: .6rem; }
.help-subtopics i { font-size: .7rem; margin-top: .25rem; }
.help-subtopics .help-detail-link { margin-left: 1rem; font-size: .78rem; }
.help-topic h4 { display: flex; align-items: baseline; gap: .65rem; font-size: 1rem; color: #243c60; scroll-margin-top: 110px; }
.help-topic h4 i { color: var(--help-accent); font-size: .8em; }
.help-subsection .help-subsection { margin-left: .5rem; }
.help-family-icon { display: inline-flex; width: 1.4em; height: 1.4em; flex-shrink: 0; vertical-align: middle; }
.help-family-icon svg { width: 100%; height: 100%; }
.help-subtopics [aria-current] { color: #154bb5; background: #eaf0ff; font-weight: 700; }
.help-reader { min-width: 0; padding: 1.25rem; }
.help-breadcrumb { display: flex; flex-wrap: wrap; gap: .6rem; font-size: .8rem; color: var(--help-muted); margin: 0 0 1.8rem; }
.help-breadcrumb > i { color: var(--help-accent); }
.help-topic { min-width: 0; color: #334155; }
.help-topic h2 { display: flex; align-items: flex-start; gap: .8rem; font-size: clamp(1.55rem, 2.6vw, 2.5rem); line-height: 1.2; letter-spacing: -.025em; color: #13243d; margin: 0 0 1.7rem; }
.help-topic h2 i { color: var(--help-accent); font-size: .75em; margin-top: .18em; flex-shrink: 0; }
.help-topic h3 { display: flex; gap: .65rem; align-items: baseline; font-size: 1.12rem; color: #152c4e; margin: 2rem 0 1rem; padding-top: 1.3rem; border-top: 1px solid #e7edf5; }
.help-topic h3 i { color: var(--help-accent); font-size: .8em; }
.help-topic h2, .help-topic h3 { scroll-margin-top: 110px; }
.help-topic p { line-height: 1.85; margin: 0 0 1rem; overflow-wrap: anywhere; }
.help-topic .help-point { position: relative; padding-left: 1.8rem; }
.help-point::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: .2rem; font-size: .7rem; color: #087b76; }
.help-topic .responsive-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--help-line); border-radius: 10px; margin: 1rem 0 1.5rem; }
.help-topic table { min-width: 560px; margin: 0; font-size: .9rem; }
.help-topic table td { padding: .9rem 1rem; line-height: 1.7; vertical-align: top; border-color: #e5ebf3; }
.help-topic table tr:first-child td { background: #eef3fa; color: #243c60; font-weight: 700; }
.help-topic table tr:nth-child(2n + 3) td { background: #fafbfd; }
/* Keep CSV field names intact; narrow screens scroll the table, not the page. */
#guide-csv-field-reference table { width: 100%; min-width: 44rem; table-layout: auto; }
#guide-csv-field-reference table td {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  white-space: normal;
}
#guide-csv-field-reference table td:first-child { min-width: 13rem; white-space: nowrap; }
#guide-csv-field-reference table td:nth-child(2) { min-width: 7rem; white-space: nowrap; }
#guide-csv-field-reference table td:nth-child(3) { min-width: 24rem; }
#guide-csv-field-reference .help-csv-example {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  padding: 0;
  border: 1px solid var(--help-line);
  border-radius: 10px;
  background: #f7f9fc;
  color: #243c60;
  font-size: .85rem;
  line-height: 1.8;
  scrollbar-width: auto;
  scrollbar-color: #647b9e #e1e8f2;
}
#guide-csv-field-reference .help-csv-sheet { width: max-content; border-collapse: collapse; }
#guide-csv-field-reference .help-csv-sheet th,
#guide-csv-field-reference .help-csv-sheet td {
  min-width: 0;
  padding: .75rem 1rem;
  border: 1px solid #b7c6dc;
  white-space: nowrap;
  text-align: left;
  font-weight: 400;
  background: white;
  color: #243c60;
}
#guide-csv-field-reference .help-csv-sheet th { background: #0000cd; color: white; font-weight: 700; }
#guide-csv-field-reference .help-csv-sheet tbody tr:nth-child(even) td { background: #f1f5fc; }
#guide-csv-field-reference .help-csv-example:focus-visible { outline: 3px solid #4b83e7; outline-offset: 3px; }
.help-topic a { color: #1854c4; text-underline-offset: 3px; }
.help-menu-toggle { display: flex; width: 100%; align-items: center; gap: .7rem; border: 1px solid var(--help-line); background: white; border-radius: 9px; padding: .8rem; color: #1f3a5e; font-weight: 700; min-height: 48px; }
.help-menu-toggle > i:last-child { margin-left: auto; }
.help-enhanced #help-navigation { display: none; }
.help-menu-open #help-navigation { display: block; max-height: 60vh; overflow-y: auto; }
.help-centre a:focus-visible, .help-centre button:focus-visible, .help-topic h2:focus-visible, .help-topic h3:focus-visible { outline: 3px solid #4b83e7; outline-offset: 3px; }
.help-topic[hidden], .help-subtopics[hidden] { display: none !important; }
@media (min-width: 576px) { .help-reader { padding: 1.8rem; } }
@media (min-width: 768px) { .help-reader { padding: 2.2rem; } }
@media (min-width: 992px) {
  .help-layout.help-enhanced { grid-template-columns: 270px minmax(0, 1fr); overflow: visible; }
  .help-enhanced .help-sidebar { border-bottom: 0; border-right: 1px solid var(--help-line); border-radius: 18px 0 0 18px; }
  .help-menu-toggle { display: none; }
  .help-enhanced #help-navigation { display: block; position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; }
  .help-reader { padding: 2.5rem; }
}
@media (min-width: 1200px) { .help-layout.help-enhanced { grid-template-columns: 290px minmax(0, 1fr); } .help-reader { padding: 3rem; } }
@media (min-width: 1400px) { .help-layout.help-enhanced { grid-template-columns: 310px minmax(0, 1fr); } .help-reader { padding: 3rem 3.5rem; } }
@media print { .help-sidebar, .help-breadcrumb { display: none !important; } .help-topic[hidden] { display: block !important; } .help-topic { break-before: page; } .help-layout { display: block !important; } }
.help-reader-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); align-items: center; gap: 1rem; margin-bottom: 1.8rem; }
.help-reader-toolbar .help-breadcrumb { margin: 0; min-width: 0; }
.help-search { position: relative; min-width: 0; }
.help-search > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #64748b; font-size: .85rem; pointer-events: none; }
.help-search input { display: block; width: 100%; min-width: 0; padding: .6rem .7rem .6rem 2.2rem; border: 1px solid #cbd7e8; border-radius: 8px; background: #f8fafc; color: #172b49; min-height: 44px; font-size: .8rem; }
@media (max-width: 767px) { .help-reader-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: .65rem; } .help-reader-toolbar .help-breadcrumb { font-size: .72rem; gap: .3rem; } }
.help-search input:focus { outline: 3px solid #a5c4ff; outline-offset: 2px; }
#help-search-status:empty { display: none; }
#help-search-status { margin: .5rem 0; color: #53647c; font-size: .85rem; }
#help-search-results { max-height: 360px; overflow-y: auto; background: white; border: 1px solid #cbd7e8; border-radius: 10px; }
#help-search-results[hidden] { display: none; }
#help-search-results a { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: .3rem .6rem; padding: 1rem; border-bottom: 1px solid #e7edf5; text-decoration: none; color: #174ca6; }
#help-search-results a:hover { background: #edf3ff; }
#help-search-results span { grid-column: 2; color: #53647c; font-size: .85rem; overflow-wrap: anywhere; }
.help-scroll-hint { font-size: .75rem; color: #53647c; margin: 0 .75rem .75rem; }
.help-enhanced #help-navigation { scrollbar-width: auto; scrollbar-color: #647b9e #e1e8f2; scrollbar-gutter: stable; }
#help-navigation::-webkit-scrollbar { width: 12px; }
#help-navigation::-webkit-scrollbar-track { background: #e1e8f2; border-radius: 8px; }
#help-navigation::-webkit-scrollbar-thumb { background: #647b9e; border: 2px solid #e1e8f2; border-radius: 8px; }
#help-navigation::-webkit-scrollbar-thumb:hover { background: #375781; }
.help-enhanced #help-navigation:hover, .help-enhanced #help-navigation:focus-within { scrollbar-color: #274e80 #d4deeb; }
#help-navigation:hover::-webkit-scrollbar-thumb, #help-navigation:focus-within::-webkit-scrollbar-thumb { background: #274e80; }
.help-subsection { border-top: 1px solid #e7edf5; margin-top: 1.2rem; }
.help-subsection > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; list-style: none; cursor: pointer; min-height: 56px; padding: .8rem 0; }
.help-subsection > summary::-webkit-details-marker { display: none; }
.help-subsection > summary::after { content: '+'; font-size: 1.4rem; color: #1854c4; }
.help-subsection[open] > summary::after { content: '−'; }
.help-subsection > summary h3, .help-subsection > summary h4 { margin: 0; padding: 0; border: 0; }
.help-subsection > summary:focus-visible { outline: 3px solid #4b83e7; outline-offset: 3px; }
.help-topic-media { display: grid; gap: 1rem; }
.help-topic-media figure { margin: 0; border: 1px solid #dce4ee; border-radius: 12px; overflow: hidden; background: #f7f9fc; }
.help-topic-media video, .help-topic-media img { display: block; width: 100%; max-height: 480px; object-fit: contain; background: #142237; }
.help-topic-media figcaption { padding: 1rem; }
.help-topic-media figcaption p { margin-bottom: 0; }
@media (min-width: 992px) { .help-enhanced #help-navigation { overflow-y: scroll; } }
@media print { .help-search { display: none; } .help-subsection > .help-subsection-body { display: block !important; } }
