/* Plain question links use the existing palette; original help cards stay below. */
.faq-original-help .help-card-grid { margin: 0; }
.faq-original-help .help-card > p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.faq-admin { padding: 22px; margin-bottom: 28px; background: var(--theme-surface, #fff); border: 1px solid var(--line); }
.faq-admin-heading, .faq-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.faq-admin-heading { margin-bottom: 18px; flex-wrap: wrap; }
.faq-admin-heading h2 { margin: 0 0 8px; font-size: 20px; }
.faq-admin-heading p { margin: 0; color: var(--soft); font-size: 13px; line-height: 1.8; }
.faq-admin-heading > div:last-child, .faq-admin-row > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.faq-admin-row { padding: 14px 0; border-top: 1px solid var(--line); }
.faq-admin-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.faq-admin-row small { display: block; margin-top: 5px; color: var(--soft); }
.faq-admin-row .btn { min-height: 44px; }
.faq-admin-dialog { box-sizing: border-box; width: min(1040px, calc(100vw - 32px)); max-width: none; height: min(820px, 90vh); height: min(820px, 90dvh); max-height: none; margin: auto; padding: 0; border: 0; border-radius: 12px; background: var(--theme-surface, #fff); color: var(--ink); box-shadow: 0 18px 60px #10171930; overflow: hidden; }
.faq-admin-dialog::backdrop { background: #10171959; }
.faq-admin-dialog [data-faq-form] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; margin: 0; }
.faq-editor-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 24px; border-bottom: 1px solid var(--line); }
.faq-editor-header h2 { flex: 1; margin: 0; font-size: 20px; }
.faq-editor-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; min-height: 0; padding: 22px 24px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.faq-editor-fields { display: flex; flex-direction: column; min-width: 0; }
.faq-editor-fields :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-height: 44px; margin-top: 7px; }
.faq-editor-fields .faq-content-field { display: flex; flex-direction: column; flex: 1; margin-bottom: 0; }
.faq-editor-fields textarea { flex: 1; min-height: 240px; resize: vertical; font-family: Consolas, monospace; font-size: 14px; line-height: 1.7; tab-size: 2; }
.faq-editor-preview { min-width: 0; border-left: 1px solid var(--line); padding-left: 24px; }
.faq-editor-preview > h3 { margin: 0 0 18px; color: var(--soft); font-size: 13px; font-weight: 600; }
.faq-preview-surface > h2 { margin: 0 0 18px; font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.faq-preview-surface .markdown-content { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; overflow-x: auto; }
.faq-preview-surface .markdown-content > :first-child { margin-top: 0; }
.faq-preview-surface :is(code, pre) { white-space: pre-wrap; overflow-wrap: anywhere; }
.faq-preview-surface :is(img, video, iframe) { max-width: 100%; }
.faq-preview-surface img { height: auto; }
.faq-preview-surface a { color: var(--teal); text-underline-offset: 4px; }
.faq-preview-empty { margin: 0; color: var(--soft); font-size: 14px; }
.faq-editor-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.faq-editor-footer > .status { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.faq-editor-footer .btn { min-height: 44px; }
.faq-admin :is(button, input, select, textarea, a):focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.faq-admin label { display: block; margin-bottom: 14px; }
.faq-admin label small { display: block; margin-top: 5px; color: var(--soft); line-height: 1.8; }
.faq-admin textarea { box-sizing: border-box; width: 100%; }
.faq-admin + .content-admin-shell .content-admin-toolbar { flex-wrap: wrap; }
.faq-admin + .content-admin-shell .admin-list-tools { min-width: 0; max-width: 100%; flex-wrap: wrap; }
.faq-admin + .content-admin-shell .content-import { max-width: 100%; flex-wrap: wrap; }
@media (max-width: 720px) {
  .faq-admin { padding: 16px; }
  .faq-admin-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .faq-admin-dialog { width: calc(100vw - 24px); height: 92vh; height: 92dvh; }
  .faq-editor-header { padding: 10px 12px 10px 18px; }
  .faq-editor-header h2 { font-size: 18px; }
  .faq-editor-body { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 24px; }
  .faq-editor-preview { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .faq-editor-footer { padding: 12px 18px; }
  .faq-editor-footer > .status:not(:empty) { flex-basis: 100%; }
}
.faq-center {
  margin: 28px var(--page-gutter, 22px) 40px;
  color: var(--ink);
  min-width: 0;
}
.faq-center [hidden] { display: none !important; }
.faq-widget [hidden] { display: none !important; }
.faq-widget-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; max-height: 216px; overflow: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.faq-widget-tabs button { min-height: 44px; padding: 10px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--soft); font: inherit; font-size: 14px; line-height: 1.6; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.faq-widget-tabs button[aria-selected="true"] { border-bottom-color: var(--teal); color: var(--teal); font-weight: 600; }
.faq-widget-tabs button:hover { color: var(--ink); }
.faq-widget-answer { padding: 16px 0 4px; max-height: 480px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.faq-widget-answer .markdown-content { min-width: 0; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.faq-widget-answer .markdown-content > :first-child { margin-top: 0; }
.faq-widget-answer .markdown-content > :last-child { margin-bottom: 0; }
.faq-widget-answer :is(code, pre) { white-space: pre-wrap; overflow-wrap: anywhere; }
.faq-widget-answer a { color: var(--teal); text-underline-offset: 4px; }
.faq-widget-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--teal); font-size: 14px; text-underline-offset: 4px; }
.faq-widget-empty { color: var(--soft); font-size: 14px; }
.license-page-sidebar { display: grid; gap: 28px; min-width: 0; }
.license-faq { min-width: 0; padding-top: 24px; border-top: 1px solid var(--line); }
.license-faq > header h2 { margin: 0 0 6px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.license-faq > header p { margin: 0 0 14px; color: var(--soft); font-size: 12px; line-height: 1.7; }
.license-faq .faq-question-list { --faq-columns: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.license-faq .faq-question { border-bottom: 1px solid var(--line); }
.license-faq .faq-question::before { display: none; }
.license-faq .faq-question-button { width: 100%; padding: 12px 0; font-size: 13px; line-height: 1.75; text-decoration: none; }
.license-faq .faq-question-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.license-faq .faq-widget-more { gap: 8px; margin-top: 12px; font-size: 12px; text-decoration: none; }
.license-faq .faq-widget-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.license-faq .faq-widget-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.license-faq .faq-pagination { justify-content: flex-start; gap: 4px; }
.license-faq .faq-pagination span { flex-basis: 100%; font-size: 12px; }
@media (max-width: 1050px) {
  .license-page-sidebar { gap: 20px; }
  .license-faq { padding-top: 20px; }
  .license-faq .faq-question-list { --faq-columns: 3; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 20px; }
}
@media (max-width: 560px) {
  .license-faq .faq-question-list { --faq-columns: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
}
.faq-widget :is(button, a, [role="tabpanel"]):focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.faq-heading { display: grid; grid-template-columns: minmax(230px, .9fr) minmax(140px, .5fr) minmax(320px, 1fr); align-items: center; gap: 24px; margin-bottom: 22px; }
.faq-heading > div:first-child { min-width: 0; }
.faq-heading > .page-greeting-art { display: flex; align-items: center; justify-content: center; min-width: 0; }
.faq-heading > .page-greeting-art img { width: 100%; max-width: 210px; height: 140px; max-height: 140px; object-fit: contain; }
.faq-heading > .page-greeting { grid-column: 3; grid-row: auto; grid-template-columns: minmax(0, 1fr) 140px; min-height: 0; gap: 16px; padding: 8px 0 8px 20px; border-top: 0; }
.faq-heading .page-greeting > strong { font-size: 18px; line-height: 1.6; }
.faq-heading .page-clock { padding-left: 16px; }
.faq-heading .page-clock time { font-size: 24px; }
.faq-heading h1 { margin: 0 0 8px; font-size: clamp(28px, 3vw, 38px); line-height: 1.25; letter-spacing: -.025em; }
.faq-heading p { margin: 0; color: var(--soft); font-size: 15px; }
.faq-center .content-hub-tabs { position: static; margin: 0 0 20px; padding: 0 0 16px; }
.faq-question-group { margin-bottom: 28px; }
.faq-question-group h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.faq-priority-questions { display: grid; grid-template-columns: minmax(0, 4fr) minmax(160px, 1fr); align-items: start; gap: 28px; margin: 28px 0 36px; }
.faq-priority-body { min-width: 0; }
.faq-illustration { display: flex; justify-content: center; align-items: center; margin-top: 16px; min-width: 0; }
.faq-illustration img { display: block; width: 100%; height: auto; max-height: 170px; object-fit: contain; }
.faq-priority-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.faq-priority-heading h2 { margin: 0; font-size: 20px; }
.faq-priority-heading p { margin: 0; font-size: 13px; color: var(--soft); }
.faq-question-list { --faq-columns: 4; display: grid; grid-template-columns: repeat(var(--faq-columns), minmax(0, 1fr)); column-gap: 28px; row-gap: 4px; }
.faq-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.faq-pagination button { min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: var(--teal); font: inherit; font-size: 14px; cursor: pointer; }
.faq-pagination button:disabled { color: var(--soft); opacity: .55; cursor: default; }
.faq-pagination button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.faq-pagination span { color: var(--soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.faq-question { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.faq-question::before { content: ""; flex: 0 0 4px; width: 4px; height: 4px; background: var(--ink); position: relative; top: -3px; }
.faq-question-button { display: block; min-height: 44px; max-width: 100%; padding: 9px 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 400; line-height: 1.75; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; overflow-wrap: anywhere; cursor: pointer; }
.faq-question-button:is(:hover, :focus-visible) { color: var(--teal); }
.faq-answer-dialog { box-sizing: border-box; width: min(560px, calc(100vw - 32px)); max-width: none; max-height: 80vh; max-height: 80dvh; margin: auto; padding: 0; border: 0; border-radius: 12px; background: var(--theme-surface, #fff); color: var(--ink); box-shadow: 0 18px 60px #10171930; overflow: hidden; }
.faq-answer-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.faq-answer-dialog::backdrop { background: #10171959; }
.faq-answer-header { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px 24px; border-bottom: 1px solid var(--line); }
.faq-answer-header h2 { flex: 1; min-width: 0; margin: 0; padding: 8px 0; font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.faq-answer-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--soft); cursor: pointer; }
.faq-answer-close:hover { background: var(--theme-hover, #eef8f6); color: var(--teal); }
.faq-answer-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.faq-answer { min-height: 0; padding: 20px 24px 24px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.faq-answer .markdown-content { max-width: 72ch; min-width: 0; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.faq-answer .markdown-content > :first-child { margin-top: 0; }
.faq-answer .markdown-content > :last-child { margin-bottom: 0; }
.faq-answer :is(code, pre) { white-space: pre-wrap; overflow-wrap: anywhere; }
.faq-answer img { max-width: 100%; height: auto; }
.faq-image-thumb { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 5px; max-width: 100%; margin: 6px 10px 6px 0; padding: 0; border: 0; background: transparent; color: var(--teal); cursor: zoom-in; font: inherit; text-align: left; }
.faq-image-thumb img { width: auto; height: auto; max-width: min(160px, 100%); max-height: 110px; object-fit: contain; }
.faq-image-thumb span { font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.faq-image-thumb:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.faq-image-dialog { box-sizing: border-box; width: min(1000px, calc(100vw - 24px)); max-width: none; max-height: 92vh; max-height: 92dvh; margin: auto; padding: 0; border: 0; border-radius: 12px; background: var(--theme-surface, #fff); color: var(--ink); box-shadow: 0 18px 60px #10171930; overflow: auto; }
.faq-image-dialog::backdrop { background: #101719b3; }
.faq-image-body { display: grid; place-items: center; min-height: 100px; padding: 16px; }
.faq-image-body img { display: block; max-width: 100%; max-height: calc(92dvh - 120px); width: auto; height: auto; object-fit: contain; }
.faq-image-body p { color: var(--soft); font-size: 14px; }
.faq-answer a, .faq-help-footer a { color: var(--teal); text-underline-offset: 4px; }
.faq-help-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 700; text-decoration: none; }
.faq-help-footer a:hover { text-decoration: underline; }
.faq-help-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.faq-help-footer p { margin: 0; color: var(--soft); font-size: 13px; line-height: 1.8; }
.faq-center :is(button, a, select, summary):focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (max-width: 720px) {
  .faq-center { margin-top: 22px; }
  .faq-answer-dialog { width: calc(100vw - 24px); max-height: 85vh; max-height: 85dvh; }
  .faq-answer-header { padding: 12px 12px 10px 18px; }
  .faq-answer { padding: 16px 18px 20px; }
}


@media (max-width: 1180px) {
  .faq-heading { grid-template-columns: minmax(0, 1fr) 140px; gap: 12px 20px; }
  .faq-heading > .page-greeting { grid-column: 1 / -1; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .faq-question-list { --faq-columns: 3; column-gap: 20px; }
}
@media (max-width: 900px) {
  .faq-question-list { --faq-columns: 2; }
  .faq-priority-questions { grid-template-columns: minmax(0, 1fr) 150px; gap: 20px; }
}
@media (max-width: 520px) {
  .faq-question-list { --faq-columns: 1; row-gap: 0; }
  .faq-priority-questions { grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 24px 0 32px; }
  .faq-illustration { justify-self: center; width: 180px; margin-top: 0; }
  .faq-heading { grid-template-columns: minmax(0, 1fr) 100px; }
  .faq-heading > .page-greeting-art img { height: 96px; max-height: 96px; }
  .faq-heading > .page-greeting { grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; }
  .faq-heading .page-greeting > strong { font-size: 14px; }
  .faq-heading .page-clock { padding: 0 0 0 12px; border-top: 0; border-left: 1px solid var(--line); }
  .faq-heading .page-clock time { font-size: 20px; }
  .faq-pagination { justify-content: center; gap: 4px; }
}
.faq-page-image-dialog { box-sizing: border-box; width: min(600px, calc(100vw - 24px)); max-width: none; max-height: 90dvh; padding: 0; margin: auto; border: 0; border-radius: 12px; background: var(--theme-surface, #fff); color: var(--ink); box-shadow: 0 18px 60px #10171930; overflow: auto; }
.faq-page-image-dialog::backdrop { background: #10171959; }
.faq-page-image-fields { padding: 20px 24px; }
.faq-page-image-fields .input { box-sizing: border-box; width: 100%; margin-top: 8px; min-height: 44px; }
.faq-page-image-fields p { color: var(--soft); font-size: 13px; line-height: 1.7; }
.faq-page-image-preview img { display: block; width: 100%; height: 160px; object-fit: contain; }
