:root {
    --bg: #0b0c10;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-2: rgba(255, 255, 255, 0.1);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.7);
    --border: rgba(255, 255, 255, 0.14);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --accent: #7dd3fc;
    --accent-2: #a78bfa;
    --radius: 18px;
    --container: 920px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(900px 300px at 15% 0%, rgba(125, 211, 252, 0.15), transparent 60%),
        radial-gradient(800px 260px at 90% 0%, rgba(167, 139, 250, 0.16), transparent 55%),
        var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.muted {
    color: var(--muted);
}

.dot {
    opacity: 0.6;
    padding: 0 0.35rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    background: var(--text);
    color: var(--bg);
    padding: 10px 12px;
    border-radius: 10px;
}

.skip-link:focus {
    left: 12px;
    z-index: 9999;
}

/* Header / breadcrumb */
.faq-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

.faq-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumb a {
    color: color-mix(in srgb, var(--accent) 85%, var(--text));
}

.breadcrumb__sep {
    opacity: 0.5;
}

.faq-home-link {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.faq-home-link:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

/* Main */
.faq-main {
    padding: 28px 16px 72px;
}

.faq-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(22px, 3.2vw, 30px);
    letter-spacing: 0.2px;
    line-height: 1.3;
    font-weight: 700;
}

.faq-intro {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 15px;
    max-width: 62ch;
}

.faq-entity {
    margin: 0;
    font-size: 13px;
    max-width: 68ch;
    line-height: 1.65;
}

/* Controls */
.faq-controls {
    margin-top: 22px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 60%, transparent));
    box-shadow: var(--shadow);
}

.faq-search-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.faq-search {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    outline: none;
}

.faq-search::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.faq-search:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.faq-filters {
    margin-top: 14px;
}

.faq-filters__label {
    font-size: 12px;
    margin-bottom: 8px;
}

.faq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faq-chip {
    appearance: none;
    margin: 0;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.3;
}

.faq-chip:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.faq-chip.is-active {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--accent-2));
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--accent) 22%, transparent),
        color-mix(in srgb, var(--accent-2) 18%, transparent)
    );
    color: var(--text);
}

/* Category sections */
.faq-list {
    margin-top: 28px;
}

.faq-category {
    margin-bottom: 28px;
}

.faq-category__title {
    margin: 0 0 6px;
    font-size: clamp(17px, 2.2vw, 20px);
    line-height: 1.35;
}

.faq-category__blurb {
    margin: 0 0 12px;
    font-size: 13px;
}

.faq-category__items {
    display: grid;
    gap: 10px;
}

/* Accordion items */
.faq-item {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    overflow: hidden;
}

.faq-item[hidden],
.faq-category[hidden] {
    display: none !important;
}

.faq-item__summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.45;
}

.faq-item__summary::-webkit-details-marker {
    display: none;
}

.faq-item__summary::before {
    content: "";
    flex: 0 0 auto;
    width: 0.55em;
    height: 0.55em;
    margin-top: 0.4em;
    border-right: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    border-bottom: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

.faq-item[open] > .faq-item__summary::before {
    transform: rotate(45deg);
    margin-top: 0.35em;
}

.faq-item__summary:hover {
    background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}

.faq-item__question {
    flex: 1;
    min-width: 0;
}

.faq-item__body {
    padding: 0 16px 16px;
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.faq-item__answer {
    padding-top: 12px;
}

.faq-item__answer p {
    margin: 0 0 10px;
    font-size: 14px;
    color: color-mix(in srgb, var(--text) 92%, transparent);
}

.faq-item__answer p:last-child {
    margin-bottom: 0;
}

.faq-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.faq-item__audience {
    font-size: 12px;
}

.faq-copy-link {
    appearance: none;
    margin: 0;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.faq-copy-link:hover,
.faq-copy-link.is-copied {
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}

.faq-related {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed color-mix(in srgb, var(--border) 80%, transparent);
}

.faq-related__label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.faq-related ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
}

.faq-related a {
    font-size: 13px;
    color: color-mix(in srgb, var(--accent) 80%, var(--text));
    border-bottom: 1px dashed transparent;
}

.faq-related a:hover {
    text-decoration: none;
    border-bottom-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Footer disclaimer */
.faq-disclaimer {
    margin-top: 36px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    font-size: 13px;
    color: var(--muted);
}

.faq-disclaimer p {
    margin: 0 0 10px;
}

.faq-disclaimer p:last-child {
    margin-bottom: 0;
}

.faq-disclaimer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
}

.faq-disclaimer__links a {
    color: color-mix(in srgb, var(--accent) 75%, var(--text));
}

@media (max-width: 720px) {
    .faq-header__inner {
        padding: 12px 16px;
    }

    .faq-main {
        padding-top: 20px;
    }

    .faq-controls {
        padding: 14px;
    }

    .faq-chip {
        padding: 6px 10px;
        font-size: 12px;
    }

    .faq-item__summary {
        padding: 12px 14px;
        font-size: 14px;
    }

    .faq-item__body {
        padding: 0 14px 14px;
    }
}

@media print {
    :root {
        --bg: #fff;
        --text: #111;
        --muted: #444;
        --border: #ddd;
        --surface: #fff;
        --surface-2: #fff;
    }

    body {
        background: #fff;
    }

    .faq-header {
        position: static;
        backdrop-filter: none;
    }

    .skip-link,
    .faq-controls,
    .faq-copy-link {
        display: none !important;
    }

    .faq-item {
        break-inside: avoid;
        box-shadow: none;
    }

    .faq-item:not([open]) .faq-item__body {
        display: block !important;
    }
}
