/* Page-level rules for the static site (M10-T41). Design classes live in bundle.css §2.8; keep this file small. */
html {
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
[hidden] {
    display: none !important;
}
body {
    margin: 0;
    background: var(--bg);
}
.site {
    min-height: 100vh;
}
[id] {
    scroll-margin-top: 16px;
}
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
.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;
}
/* Placeholders the client must fill before launch (company name, domain, dates). Remove the class when filled. */
.ph {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    border-radius: 4px;
    padding: 0 4px;
}
.doc-todo {
    color: var(--text-muted);
    font-style: italic;
}
/* Real form controls on top of the design's look */
input.input,
textarea.input {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    font: 400 15px var(--font-ui);
}
input.input::placeholder,
textarea.input::placeholder,
.help-search input::placeholder {
    color: var(--text-faint);
}
.web-check {
    cursor: pointer;
}
.web-check .box .i {
    visibility: hidden;
}
.web-check input:checked + .box {
    background: var(--primary-fill);
    box-shadow: none;
    color: var(--on-primary);
}
.web-check input:checked + .box .i {
    visibility: visible;
}
.web-check input:focus-visible + .box {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
.del-form {
    display: grid;
    gap: 14px;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.help-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    color: var(--text);
    font: 400 15px var(--font-ui);
}
.help-count {
    min-height: 20px;
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}
/* Legal pages on phones and narrow tablets (M10-T109, client review LEGAL-01): the side TOC gives way to a collapsed
   "On this page" button above the text, so the text starts right under the tabs and takes the full width. Media
   queries (not container queries) so browsers without @container support never get the 240 px column on a phone.
   The design's own rules (bundle.css §2.8) stay as they are; this overrides them on the web site only. */
.doc-toc-fold {
    display: none;
}
@media (max-width: 900px) {
    .doc-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .doc-toc {
        display: none;
    }
    .doc-toc-fold {
        display: block;
        margin-bottom: 28px;
        border-radius: var(--r-lg);
        background: var(--surface);
        box-shadow: inset 0 0 0 1px var(--border);
        font-size: 14px;
    }
    .doc-toc-fold summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        padding: 0 16px;
        border-radius: var(--r-lg);
        cursor: pointer;
        list-style: none;
        color: var(--text);
        font: 600 15px/1 var(--font-ui);
    }
    .doc-toc-fold summary::-webkit-details-marker {
        display: none;
    }
    .doc-toc-fold summary::after {
        content: '';
        width: 8px;
        height: 8px;
        margin: -4px 4px 0 12px;
        border: solid var(--text-muted);
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        transition: transform 0.15s;
    }
    .doc-toc-fold[open] summary::after {
        margin-top: 4px;
        transform: rotate(-135deg);
    }
    .doc-toc-fold nav {
        display: grid;
        gap: 2px;
        padding: 0 8px 10px;
    }
    .doc-toc-fold a {
        display: block;
        padding: 9px 8px;
        border-radius: var(--r-md);
        color: var(--text-muted);
        text-decoration: none;
        line-height: 1.35;
    }
    /* Long emails and URLs wrap instead of widening the page. */
    .doc-article {
        min-width: 0;
        overflow-wrap: break-word;
    }
}
@media (prefers-reduced-motion: reduce) {
    .doc-toc-fold summary::after {
        transition: none;
    }
}
@media print {
    .site-nav,
    .doc-toc-fold,
    .doc-toc,
    .doc-tabs,
    .site-foot {
        display: none;
    }
}
/* Result headings get focus from site.js so screen readers announce them; they are not controls (M10-T82). */
.web-done h2[tabindex='-1']:focus {
    outline: none;
}
