/* FAQ page styles — Apple-style, matches the rest of the site */

main {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: #1d1d1f;
}

/* ---------- Hero ---------- */
.faq-hero {
    text-align: center;
    padding: 32px 20px 12px;
}

.faq-hero .faq-hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: color-mix(in srgb, #007AFF 12%, #f0f0f3);
}

.faq-hero .faq-hero-icon svg {
    width: 44px;
    height: 44px;
    fill: #007AFF;
}

.faq-hero h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    color: #000;
}

.faq-hero p {
    font-size: 21px;
    color: #6e6e73;
    font-weight: 400;
    max-width: 620px;
    margin: 0 auto;
}

/* ---------- Table of contents ---------- */
.faq-toc {
    background-color: #fff;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 24px 0 8px;
}

.faq-toc h2 {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #000;
}

.faq-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px 28px;
}

.faq-toc a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1d1d1f;
    font-size: 16px;
    padding: 8px 6px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.faq-toc a:hover {
    background-color: #f0f0f3;
}

.faq-toc .faq-toc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background-color: var(--accent, #007AFF);
}

/* ---------- Section title ---------- */
.faq-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 36px 8px 16px;
    letter-spacing: -0.01em;
}

/* ---------- Article card ---------- */
.faq-article {
    --accent: #007AFF;
    background-color: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
    scroll-margin-top: 96px;
}

.faq-article.accent-blue   { --accent: #007AFF; }
.faq-article.accent-indigo { --accent: #5856D6; }
.faq-article.accent-green  { --accent: #34C759; }
.faq-article.accent-orange { --accent: #FF9500; }
.faq-article.accent-pink   { --accent: #FF2D55; }

.faq-article-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.faq-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: color-mix(in srgb, var(--accent) 12%, #f0f0f3);
}

.faq-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--accent);
}

.faq-article-heading h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0;
    letter-spacing: -0.01em;
}

.faq-article-heading .faq-subtitle {
    font-size: 16px;
    color: #6e6e73;
    margin: 2px 0 0;
}

/* ---------- Body content ---------- */
.faq-body > p {
    font-size: 17px;
    color: #1d1d1f;
    margin: 0 0 16px;
}

.faq-body h3 {
    font-size: 19px;
    font-weight: 700;
    color: #000;
    margin: 24px 0 4px;
}

.faq-body h3 + .faq-section-subtitle {
    margin-top: 0;
}

.faq-section-subtitle {
    font-size: 15px;
    color: #8a8a8e;
    font-style: italic;
    margin: 0 0 12px;
}

.faq-body a {
    color: var(--accent, #007AFF);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.faq-body a:hover {
    opacity: 0.7;
}

.faq-body code {
    font-family: "SF Mono", Consolas, "Courier New", monospace;
    font-size: 0.9em;
    background-color: #f0f0f3;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

/* ---------- Numbered steps ---------- */
.faq-steps {
    list-style: none;
    counter-reset: faq-step;
    margin: 0 0 16px;
    padding: 0;
}

.faq-steps > li {
    counter-increment: faq-step;
    position: relative;
    padding-left: 48px;
    margin-bottom: 16px;
    font-size: 17px;
    color: #1d1d1f;
    min-height: 32px;
}

.faq-steps > li::before {
    content: counter(faq-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--accent) 12%, #f0f0f3);
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-steps > li p {
    margin: 8px 0 0;
    color: #515154;
    font-size: 16px;
}

/* ---------- Callout ---------- */
.faq-callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background-color: #f5f5f7;
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 16px;
    font-size: 16px;
    color: #1d1d1f;
}

.faq-callout .faq-callout-emoji {
    font-size: 18px;
    line-height: 1.4;
    flex-shrink: 0;
}

/* ---------- Image / figure support ---------- */
.faq-figure {
    margin: 0 auto 20px;
    max-width: 560px;
}

.faq-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid #e8e8ed;
    display: block;
    margin: 0 auto;
}

.faq-figure figcaption {
    font-size: 14px;
    color: #8a8a8e;
    text-align: center;
    margin-top: 8px;
}

.faq-credit {
    display: block;
    font-size: 12px;
    color: #aeaeb2;
    margin-top: 4px;
}

.faq-credit a {
    color: inherit;
    text-decoration: underline;
}

/* Inline SVG diagrams (e.g. the Wake-on-LAN flow) */
.faq-figure-diagram {
    max-width: 600px;
}

.faq-figure svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid #e8e8ed;
}

.faq-figure svg text {
    font-family: inherit;
}

/* Terminal window mockup (e.g. ipconfig /all output) */
.faq-figure-terminal {
    max-width: 560px;
}

.faq-terminal {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e8e8ed;
    background: #1c1c1e;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.faq-terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: #323236;
    position: relative;
}

.faq-terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #5a5a5e;
}

.faq-terminal-dot:nth-child(1) { background: #ff5f57; }
.faq-terminal-dot:nth-child(2) { background: #febc2e; }
.faq-terminal-dot:nth-child(3) { background: #28c840; }

.faq-terminal-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: #98989d;
    pointer-events: none;
}

.faq-terminal-body {
    margin: 0;
    padding: 16px 18px;
    font-family: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: #c7c7cc;
    white-space: pre;
    overflow-x: auto;
}

.faq-term-prompt {
    color: #98989d;
}

.faq-term-hl {
    display: block;
    margin: 2px -18px;
    padding: 2px 18px 2px 15px;
    border-left: 3px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: #ffffff;
}

.faq-term-mac {
    color: #ffffff;
    font-weight: 700;
}

.faq-term-note {
    color: color-mix(in srgb, var(--accent) 55%, #ffffff);
    font-style: italic;
}

@keyframes faqWolPacket {
    0%   { transform: translateX(0);     opacity: 0; }
    12%  { opacity: 1; }
    82%  { opacity: 1; }
    100% { transform: translateX(250px); opacity: 0; }
}

.faq-wol-packet {
    animation: faqWolPacket 2.8s ease-in-out infinite;
}

@keyframes faqIpPacket {
    0%   { transform: translateX(0);     opacity: 0; }
    12%  { opacity: 1; }
    72%  { opacity: 1; }
    100% { transform: translateX(150px); opacity: 0; }
}

.faq-ip-packet {
    animation: faqIpPacket 2.8s ease-in-out infinite;
}

@keyframes faqWolFlow {
    to { stroke-dashoffset: -48; }
}

.faq-wol-line {
    animation: faqWolFlow 1.6s linear infinite;
}

@keyframes faqWolWake {
    0%, 45%   { opacity: 0.2; }
    62%, 100% { opacity: 1; }
}

.faq-wol-power {
    animation: faqWolWake 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .faq-wol-packet,
    .faq-ip-packet,
    .faq-wol-line,
    .faq-wol-power {
        animation: none;
    }
    .faq-wol-power {
        opacity: 1;
    }
}

/* ---------- See also ---------- */
.faq-see-also {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e8e8ed;
}

.faq-see-also h3 {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a8a8e;
    margin: 0 0 12px;
}

.faq-see-also ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.faq-see-also a {
    display: inline-block;
    background-color: #f0f0f3;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 980px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.faq-see-also a:hover {
    background-color: var(--accent);
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    main {
        padding: 16px;
    }

    .faq-hero {
        padding: 16px 12px 8px;
    }

    .faq-hero h1 {
        font-size: 34px;
    }

    .faq-hero p {
        font-size: 17px;
    }

    .faq-toc ul {
        grid-template-columns: 1fr;
    }

    .faq-article {
        padding: 20px 18px;
    }

    .faq-article-heading h2 {
        font-size: 20px;
    }

    .faq-section-title {
        font-size: 21px;
    }

    .faq-icon {
        width: 44px;
        height: 44px;
    }

    .faq-icon svg {
        width: 24px;
        height: 24px;
    }
}
