/* The site's design system. The tokens below (:root) are shared by the whole app — app.css maps its own names onto
   them. The page styles further down hang off .site, which only the public layouts (MarketingLayout, AuthLayout)
   carry.

   The idea is the court record: in the editor, what was said is set in Courier with a double rule down the margin,
   like a reporter's transcript page. Everything around it stays quiet. */

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/public-sans-latin-wght.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/public-sans-latin-ext-wght.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Courier Prime";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/courier-prime-latin-400.woff2") format("woff2");
}

@font-face {
    font-family: "Courier Prime";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/courier-prime-latin-700.woff2") format("woff2");
}

:root {
    /* Ink and paper */
    --ink: #172033;
    --graphite: #5a6372;
    --paper: #ffffff;
    --archive: #f1f3f6;
    --line: #d6dae0;
    --line-soft: #e6e9ed;
    /* Edges of controls (inputs, selects, checkboxes, secondary buttons): at least 3:1 against paper and archive,
       as WCAG 1.4.11 asks. --line stays for dividers and card edges, which are not controls. */
    --line-strong: #7f8896;
    /* Two depths only: a sheet resting on the desk, and something floating over the page (dialogs, menus). */
    --shadow-raised: 0 1px 2px rgba(23, 32, 51, 0.06), 0 8px 16px -10px rgba(23, 32, 51, 0.22);
    --shadow-overlay: 0 2px 4px rgba(23, 32, 51, 0.08), 0 16px 28px -14px rgba(23, 32, 51, 0.35);
    /* The one accent: a court seal / law-book oxblood. Buttons and the margin rule only. */
    --seal: #8a1c2b;
    --seal-deep: #6e1522;
    --seal-tint: #f7ebed;
    /* Only ever means "checked against the transcript". */
    --verified: #1e6b52;
    --band: #172033;
    --band-ink: #eef0f4;

    --font-sans: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-record: "Courier Prime", "Courier New", Courier, monospace;

    /* Type scale (≈1.25): small print, body, lead, h3, h2, display */
    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: 1.25rem;
    --step-2: 1.5rem;
    --step-3: clamp(1.9rem, 3.2vw, 2.6rem);
    --step-4: clamp(2.6rem, 5.6vw, 4.4rem);

    --measure: 38rem;
    --page: 76rem;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --radius: 6px;
}

.site {
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.6;
    font-feature-settings: "kern", "liga";
}

:root[data-bs-theme="dark"] {
    --ink: #e7eaf0;
    --graphite: #a5aebc;
    --paper: #121a2a;
    --archive: #0e1522;
    --line: #2e3a52;
    --line-soft: #222d42;
    --line-strong: #63708d;
    --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 16px -10px rgba(0, 0, 0, 0.6);
    --shadow-overlay: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 28px -14px rgba(0, 0, 0, 0.7);
    --seal: #d8606f;
    --seal-deep: #e57a88;
    --seal-tint: rgba(216, 96, 111, 0.14);
    --verified: #62c7a1;
    --band: #0b111c;
    --band-ink: #e7eaf0;
}

.site h1,
.site h2,
.site h3 {
    color: var(--ink);
    font-family: var(--font-sans);
    text-wrap: balance;
}

.site p {
    text-wrap: pretty;
}

.site a {
    color: inherit;
    text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
    text-underline-offset: 0.2em;
}

.site a:hover {
    color: var(--seal);
    text-decoration-color: currentColor;
}

.site :focus-visible {
    outline: 2px solid var(--seal);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Blazor moves focus to the page heading after navigation (tabindex="-1") so screen readers announce it; that is
   not a keyboard focus the user needs to see. */
.site [tabindex="-1"]:focus,
.site [tabindex="-1"]:focus-visible {
    outline: none;
}

.site ::selection {
    background: var(--seal-tint);
    color: var(--ink);
}

/* Buttons shared by every public page. Square-ish corners: this is a document, not a toy. */
.site .site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid var(--seal);
    border-radius: var(--radius);
    background: var(--seal);
    color: #fff;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.site .site-btn:hover,
.site .site-btn:focus-visible {
    border-color: var(--seal-deep);
    background: var(--seal-deep);
    color: #fff;
}

:root[data-bs-theme="dark"] .site .site-btn:not(.site-btn-quiet),
:root[data-bs-theme="dark"] .site .site-btn:not(.site-btn-quiet):hover {
    color: #1a0f12;
}

.site .site-btn-quiet {
    border-color: var(--line-strong);
    background: transparent;
    color: var(--ink);
}

.site .site-btn-quiet:hover,
.site .site-btn-quiet:focus-visible {
    border-color: var(--ink);
    background: transparent;
    color: var(--ink);
}

.site .site-link {
    font-weight: 600;
}

/* Page frame used by every section */
.site .site-section {
    width: min(100% - 2 * var(--gutter), var(--page));
    margin-inline: auto;
}

/* ---------------------------------------------------------------------------------------------
   Shared page pieces
   --------------------------------------------------------------------------------------------- */

/* A plain index of features: term in ink, description in graphite, hairline between rows. */
.site .site-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 5vw, 4.5rem);
    margin: 0;
}

.site .site-index > div {
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
}

.site .site-index dt,
.site .site-index h3,
.site .site-index h4 {
    margin: 0 0 0.3rem;
    font-size: var(--step-0);
    font-weight: 650;
}

.site .site-index dd,
.site .site-index p {
    margin: 0;
    color: var(--graphite);
    max-width: var(--measure);
}

@media (max-width: 767.98px) {
    .site .site-index {
        grid-template-columns: 1fr;
    }
}

/* Section heading row: heading on the left, a short line of context on the right when there is one. */
.site .site-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 1rem 3rem;
    margin-bottom: 2rem;
}

.site .site-section-head h2 {
    margin: 0;
    font-size: var(--step-3);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.site .site-section-head p {
    margin: 0.35rem 0 0;
    color: var(--graphite);
    max-width: 32rem;
}

@media (max-width: 767.98px) {
    .site .site-section-head {
        grid-template-columns: 1fr;
    }
}

/* FAQ shown as two columns: the heading stays put while the answers scroll. */
.site .site-faq {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
    gap: 2rem clamp(2rem, 6vw, 6rem);
    padding-block: clamp(3.5rem, 8vw, 6rem);
    border-top: 1px solid var(--line);
}

.site .site-faq > h2 {
    position: sticky;
    top: 2rem;
    align-self: start;
    margin: 0;
    font-size: var(--step-3);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

@media (max-width: 767.98px) {
    .site .site-faq {
        grid-template-columns: 1fr;
    }

    .site .site-faq > h2 {
        position: static;
    }
}

/* The dark band that closes a page. The only large color field on the site. */
.site .site-closing {
    background: var(--band);
    color: var(--band-ink);
}

.site .site-closing-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 2.5rem clamp(2rem, 6vw, 6rem);
    width: min(100% - 2 * var(--gutter), var(--page));
    margin-inline: auto;
    padding-block: clamp(3.5rem, 8vw, 6rem);
}

.site .site-closing h2 {
    max-width: 16ch;
    margin: 0 0 1.75rem;
    color: var(--band-ink);
    font-size: var(--step-3);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.site .site-closing .site-btn {
    border-color: #fff;
    background: #fff;
    color: var(--seal);
}

.site .site-closing .site-btn:hover,
.site .site-closing .site-btn:focus-visible {
    border-color: #fff;
    background: transparent;
    color: #fff;
}

.site .site-closing-note {
    margin: 1rem 0 0;
    color: color-mix(in srgb, var(--band-ink) 70%, transparent);
    font-size: var(--step--1);
    max-width: 34rem;
}

@media (max-width: 767.98px) {
    .site .site-closing-inner {
        grid-template-columns: 1fr;
    }
}

/* The public header is sticky (MarketingLayout.razor.css): in-page links (#add-ons, #security…) land below it, not under it. */
html:has(.marketing-layout) {
    scroll-padding-top: 5.5rem;
}
