/* Support page. Tokens come from style.css; form styles from products.css. */

.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;
}

.sp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Hero and search ─── */

.sp-hero { padding: 152px 0 64px; text-align: center; }
.sp-hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.4rem); font-weight: 800;
    letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 14px;
}
.sp-lead { color: var(--text-secondary); font-size: 17px; max-width: 52ch; margin: 0 auto; line-height: 1.6; }

.sp-search { position: relative; max-width: 640px; margin: 36px auto 18px; text-align: left; }
.sp-search-icon {
    position: absolute; left: 18px; top: 28px; transform: translateY(-50%);
    width: 20px; height: 20px; fill: none; stroke: var(--text-tertiary);
    stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.sp-search input {
    width: 100%; height: 56px; padding: 0 52px 0 50px;
    font: inherit; font-size: 16px; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-hover);
    border-radius: 10px; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sp-search input::placeholder { color: var(--text-tertiary); }
.sp-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.sp-search input::-webkit-search-cancel-button { display: none; }
.sp-kbd {
    position: absolute; right: 16px; top: 28px; transform: translateY(-50%);
    min-width: 24px; padding: 2px 7px; text-align: center;
    font-family: var(--mono); font-size: 12px; color: var(--text-tertiary);
    border: 1px solid var(--border-hover); border-radius: 4px;
}
.sp-search input:focus ~ .sp-kbd { opacity: 0; }

.sp-results {
    position: absolute; top: 64px; left: 0; right: 0; z-index: 20;
    max-height: min(420px, 60vh); overflow-y: auto;
    background: var(--surface-2); border: 1px solid var(--border-hover);
    border-radius: 10px; box-shadow: 0 24px 48px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.4);
}
.sp-results[hidden] { display: none; }
.sp-result {
    display: block; width: 100%; padding: 13px 18px; text-align: left;
    background: none; border: 0; border-bottom: 1px solid var(--border);
    font: inherit; color: var(--text); cursor: pointer;
}
.sp-result:last-child { border-bottom: 0; }
.sp-result-title { display: block; font-size: 15px; font-weight: 600; }
.sp-result-topic { display: block; margin-top: 2px; font-size: 13px; color: var(--text-tertiary); }
.sp-result mark { background: var(--accent-glow); color: var(--text); border-radius: 2px; padding: 0 1px; }
.sp-result:hover, .sp-result[aria-selected="true"] { background: var(--surface-3); }
.sp-noresult { padding: 16px 18px; font-size: 14px; color: var(--text-secondary); }
.sp-noresult button {
    margin-top: 10px; display: inline-flex; padding: 8px 14px;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
    background: var(--surface-3); border: 1px solid var(--border-hover);
    border-radius: 6px; cursor: pointer;
}
.sp-noresult button:hover { border-color: var(--accent); }

.sp-popular {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
    font-size: 14px; color: var(--text-tertiary);
}
.sp-popular a {
    color: var(--text-secondary); text-decoration: underline;
    text-decoration-color: var(--border-hover); text-underline-offset: 4px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.sp-popular a:hover { color: var(--text); text-decoration-color: var(--accent); }

/* ─── Your panel / talk to a person ─── */

.sp-doors {
    display: grid; grid-template-columns: 1.15fr 1fr;
    width: calc(100% - 48px); max-width: 1152px;
    padding: 0; border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; background: var(--surface);
}
.sp-panel, .sp-talk { padding: 36px 40px; }
.sp-talk { background: var(--bg-elevated); border-left: 1px solid var(--border); }
.sp-doors h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.sp-doors > div > p { color: var(--text-secondary); font-size: 15px; line-height: 1.6; }

.sp-checks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.sp-checks li { position: relative; padding-left: 26px; font-size: 15px; color: var(--text); }
.sp-checks li::before {
    content: ''; position: absolute; left: 3px; top: 6px;
    width: 10px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}
.sp-panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 28px 0 20px; }
.sp-panel .btn-lg { border-radius: 8px; }
.sp-link {
    font-size: 15px; color: var(--text-secondary);
    text-decoration: underline; text-decoration-color: var(--border-hover); text-underline-offset: 4px;
}
.sp-link:hover { color: var(--text); text-decoration-color: var(--accent); }
.sp-fine { font-size: 13.5px; color: var(--text-tertiary); line-height: 1.6; }
.sp-fine a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; }

.sp-channels { list-style: none; margin: 18px 0 0; padding: 0; border-bottom: 1px solid var(--border); }
.sp-status-line { margin-top: 16px; }
.sp-channels li { border-top: 1px solid var(--border); }
.sp-channel {
    display: flex; gap: 14px; align-items: flex-start; width: 100%;
    padding: 16px 0; background: none; border: 0; text-align: left;
    font: inherit; color: var(--text); cursor: pointer;
}
.sp-channel svg {
    flex: none; width: 20px; height: 20px; margin-top: 2px;
    fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round;
}
.sp-channel strong { display: block; font-size: 15px; font-weight: 600; transition: color 0.2s; }
.sp-channel small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.sp-channel:hover strong { color: var(--accent); }
.sp-channel:focus-visible, .sp-result:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ─── Guides ─── */

.sp-guides {
    display: grid; grid-template-columns: 210px 1fr; gap: 64px;
    padding-top: 104px; padding-bottom: 104px;
}
.sp-toc {
    position: sticky; top: 96px; align-self: start;
    display: flex; flex-direction: column; gap: 2px;
    margin-left: -12px;
}
.sp-toc-title { font-size: 13px; font-weight: 600; color: var(--text-tertiary); margin: 0 0 8px 12px; }
.sp-toc a {
    padding: 8px 12px; border-radius: 6px; font-size: 14.5px;
    color: var(--text-secondary); transition: color 0.2s, background 0.2s;
}
.sp-toc a:hover { color: var(--text); }
.sp-toc a.active { color: var(--text); background: var(--surface-2); }

.sp-topic { scroll-margin-top: 96px; }
.sp-topic + .sp-topic { margin-top: 64px; }
.sp-topic h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.sp-topic[hidden] { display: none; }

.sp-article { border-bottom: 1px solid var(--border); scroll-margin-top: 84px; }
.sp-topic h2 + .sp-article { border-top: 1px solid var(--border); }
.sp-article[hidden] { display: none; }
.sp-article summary {
    position: relative; list-style: none; cursor: pointer;
    padding: 18px 44px 18px 0; font-size: 16px; font-weight: 600; color: var(--text);
    transition: color 0.2s;
}
.sp-article summary::-webkit-details-marker { display: none; }
.sp-article summary::after {
    content: ''; position: absolute; right: 8px; top: 50%;
    width: 8px; height: 8px; margin-top: -6px;
    border-right: 2px solid var(--text-tertiary); border-bottom: 2px solid var(--text-tertiary);
    transform: rotate(45deg); transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.sp-article[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.sp-article summary:hover { color: var(--accent); }
.sp-article summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.sp-answer { padding: 0 0 24px; max-width: 68ch; font-size: 15.5px; line-height: 1.7; color: var(--text-secondary); }
.sp-answer > * + * { margin-top: 12px; }
.sp-answer ol, .sp-answer ul { padding-left: 22px; }
.sp-answer li + li { margin-top: 4px; }
.sp-answer strong { color: var(--text); font-weight: 600; }
.sp-answer a {
    color: var(--text); text-decoration: underline;
    text-decoration-color: var(--accent-glow-strong); text-underline-offset: 3px;
}
.sp-answer a:hover { text-decoration-color: var(--accent); }

.sp-article.flash summary { animation: sp-flash 1.6s ease-out; }
@keyframes sp-flash { 0%, 30% { color: var(--accent); } 100% { color: var(--text); } }

/* ─── Message form ─── */

.sp-message {
    display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start;
    padding-bottom: 120px; scroll-margin-top: 90px;
}
.sp-message-intro h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.sp-message-intro p { color: var(--text-secondary); font-size: 15.5px; line-height: 1.6; }
.sp-message-intro ul { margin: 14px 0 20px; padding-left: 20px; color: var(--text); font-size: 15px; line-height: 1.8; }
.sp-form { border-radius: 12px; }
.sp-form .btn-lg { border-radius: 8px; }

/* ─── Responsive ─── */

@media (max-width: 960px) {
    .sp-doors { grid-template-columns: 1fr; }
    .sp-talk { border-left: 0; border-top: 1px solid var(--border); }
    /* Margin, not padding: the sticky topic bar must leave before the form arrives */
    .sp-guides { grid-template-columns: 1fr; gap: 24px; padding-top: 72px; padding-bottom: 0; margin-bottom: 104px; }
    .sp-toc {
        top: 70px; z-index: 5; flex-direction: row; gap: 6px;
        margin: 0 -24px; padding: 10px 24px; overflow-x: auto;
        background: var(--bg); border-bottom: 1px solid var(--border);
        scrollbar-width: none;
    }
    .sp-toc::-webkit-scrollbar { display: none; }
    .sp-toc-title { display: none; }
    .sp-toc a { flex: none; border: 1px solid var(--border); font-size: 14px; }
    .sp-topic, .sp-article { scroll-margin-top: 130px; }
    .sp-message { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
    .sp-wrap { padding-left: 16px; padding-right: 16px; }
    .sp-doors { width: calc(100% - 32px); padding: 0; }
    .sp-search input { padding-right: 16px; }
    .sp-kbd { display: none; }
    .sp-hero { padding: 116px 0 44px; }
    .sp-lead { font-size: 16px; }
    .sp-panel, .sp-talk { padding: 28px 22px; }
    .sp-toc { margin: 0 -16px; padding: 10px 16px; }
    .sp-panel-actions .btn-lg { width: 100%; justify-content: center; }
    .sp-message { padding-bottom: 88px; }
}
@media (hover: none) { .sp-kbd { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .sp-article summary::after { transition: none; }
    .sp-article.flash summary { animation: none; }
}
