/* ==========================================================================
   faq.css — faq.php
   Built on the shared content-page blocks in universal.css (.jr-page-*).
   Palette-ready: colours come from css-new/palettes/theme-*.css (light + dark).
   All rules are scoped to .jr-faq (the old file reset every element and
   styled .header / .section-title / .container site-wide).
   ========================================================================== */

/* ---------- Search (inside the header card) ---------- */
.jr-faq-search { position: relative; max-width: 560px; margin: 22px auto 0; }
.jr-faq-search i {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    color: var(--theme-text-faint); pointer-events: none;
}
.jr-faq-search input {
    width: 100%; height: 52px; padding: 0 18px 0 46px; border-radius: 999px;
    border: 1px solid var(--theme-border-strong); background: var(--theme-bg-surface); color: var(--theme-text-strong);
    font: inherit; font-size: 15px; box-shadow: var(--pg-shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.jr-faq-search input::placeholder { color: var(--theme-text-faint); }
.jr-faq-search input:focus { outline: none; border-color: var(--theme-accent); box-shadow: 0 0 0 4px var(--theme-focus-ring); }

/* ---------- Layout ---------- */
.jr-faq-layout { display: grid; gap: 24px; margin-top: 24px; align-items: start; }
.jr-faq-main { min-width: 0; }

/* ---------- Topic chips ---------- */
.jr-faq-chips {
    display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.jr-faq-chips::-webkit-scrollbar { display: none; }
.jr-faq-chip {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
    min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--theme-border-strong); background: var(--theme-bg-surface); color: var(--theme-text);
    font: inherit; font-size: 14px; font-weight: 500;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.jr-faq-chip i { font-size: 12px; color: var(--theme-text-faint); }
.jr-faq-chip:hover { border-color: var(--theme-accent); color: var(--theme-text-strong); }
.jr-faq-chip.is-active { background: var(--theme-button-bg); border-color: var(--theme-button-bg); color: var(--theme-button-text); }
.jr-faq-chip.is-active i { color: inherit; }
.jr-faq-chip:focus-visible { outline: 3px solid var(--theme-focus-ring); outline-offset: 2px; }

/* ---------- Groups + questions ---------- */
.jr-faq-group { margin-top: 18px; }
.jr-faq-group[hidden] { display: none; }
.jr-faq-group__title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px !important; font-size: 18px; font-weight: 800; }
.jr-faq-group__title .jr-page-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }

.jr-faq-item {
    background: var(--theme-bg-surface); border: 1px solid var(--theme-border); border-radius: 14px;
    margin-bottom: 10px; box-shadow: 0 1px 2px rgb(15 23 42 / .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.jr-faq-item[hidden] { display: none; }
.jr-faq-item:hover { border-color: var(--pg-accent-line); }
.jr-faq-item[open] { border-color: var(--pg-accent-line); box-shadow: var(--pg-shadow); }
.jr-faq-item summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 18px; font-size: 15px; font-weight: 600; color: var(--theme-text-strong);
    -webkit-tap-highlight-color: transparent;
}
.jr-faq-item summary::-webkit-details-marker { display: none; }
.jr-faq-item summary:focus-visible { outline: 3px solid var(--theme-focus-ring); outline-offset: -3px; border-radius: 14px; }
.jr-faq-item summary i {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
    background: var(--pg-accent-soft); color: var(--pg-accent-text);
    transition: transform .2s ease, background-color .15s ease, color .15s ease;
}
.jr-faq-item[open] summary i { transform: rotate(180deg); background: var(--theme-accent); color: var(--theme-bg-surface); }
.jr-faq-item[open] summary { color: var(--theme-heading); }

.jr-faq-answer { padding: 0 18px 18px; font-size: 15px; line-height: 1.7; color: var(--theme-text); }
.jr-faq-answer > * + * { margin-top: 10px !important; }
.jr-faq-answer ol, .jr-faq-answer ul { margin: 0; padding-left: 22px; }
.jr-faq-answer ol { list-style: decimal; }
.jr-faq-answer ul { list-style: disc; }
.jr-faq-answer li { margin-top: 4px; }
.jr-faq-answer li::marker { color: var(--pg-accent-text); font-weight: 600; }
.jr-faq-answer a { color: var(--pg-accent-text); text-decoration: underline; }

/* sample letters */
.faq-example {
    position: relative; margin-top: 14px !important; padding: 18px 18px 16px; border-radius: 12px;
    background: var(--theme-bg-subtle); border-left: 4px solid var(--theme-accent);
    font-size: 14px;
}
.faq-example > p + p { margin-top: 8px !important; }
.faq-example__label {
    display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    background: var(--pg-accent-soft); color: var(--pg-accent-text);
}

.jr-faq-empty { text-align: center; padding: 40px 20px; color: var(--theme-text-muted); }
.jr-faq-empty[hidden] { display: none; }
.jr-faq-empty i { font-size: 28px; color: var(--theme-text-faint); }
.jr-faq-empty h3 { margin-top: 10px !important; font-size: 18px; }
.jr-faq-empty a { color: var(--pg-accent-text); text-decoration: underline; }

/* ---------- Sidebar ---------- */
.jr-faq-side { display: grid; gap: 16px; }
.jr-faq-side__title { font-size: 16px; font-weight: 800; margin-bottom: 12px !important; }
.jr-faq-side__more { width: 100%; margin-top: 14px; }

.jr-faq-jobs, .jr-faq-updates { list-style: none; margin: 0; padding: 0; }
.jr-faq-jobs { display: grid; gap: 10px; }
.jr-faq-job {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px;
    border: 1px solid var(--theme-border); background: var(--theme-bg-surface);
    transition: border-color .15s ease, background-color .15s ease;
}
.jr-faq-job:hover { border-color: var(--theme-accent); background: var(--pg-accent-soft); }
.jr-faq-job__logo {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
    background: #fff; border: 1px solid var(--theme-border);
    display: flex; align-items: center; justify-content: center;
}
.jr-faq-job__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.jr-faq-job__body { display: flex; flex-direction: column; min-width: 0; }
.jr-faq-job__title { font-size: 14px; font-weight: 700; color: var(--theme-text-strong); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jr-faq-job__company { margin-top: 2px; font-size: 13px; color: var(--theme-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-faq-job__loc { margin-top: 4px; font-size: 12px; color: var(--theme-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-faq-job__loc i { color: var(--pg-accent-text); margin-right: 2px; }

.jr-faq-updates li + li { border-top: 1px solid var(--theme-border); }
.jr-faq-updates a { display: block; padding: 10px 0; font-size: 14px; line-height: 1.5; color: var(--theme-text); }
.jr-faq-updates a:hover { color: var(--pg-accent-text); }
.jr-faq-updates a p { margin: 0; }

.jr-faq-ad { min-height: 0; }
@media (max-width: 768px) { .desktopOnly { display: none; } }

@media (min-width: 1024px) {
    .jr-faq-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; margin-top: 32px; }
    .jr-faq-side { position: sticky; top: 90px; }
    .jr-faq-item summary { padding: 18px 22px; font-size: 16px; }
    .jr-faq-answer { padding: 0 22px 22px; }
}
