/* Public-site-only roles, derived from fayegram.com's monospace, quiet editorial style. */
:root {
    color-scheme: light;
    --page: #f9f8f4;
    --ink: #262923;
    --muted: #62665b;
    --rule: #deded6;
    --wash: #f0efe8;
    --focus: #466a51;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 16px;
    background: var(--page);
    color: var(--ink);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --page: #181a18;
        --ink: #e7e8e2;
        --muted: #b4b8ac;
        --rule: #343830;
        --wash: #20241f;
        --focus: #a5c4a7;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #181a18;
    --ink: #e7e8e2;
    --muted: #b4b8ac;
    --rule: #343830;
    --wash: #20241f;
    --focus: #a5c4a7;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--page); }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--page); }
.site-shell { max-width: 1080px; min-height: 100svh; margin: auto; padding: 0 48px; display: flex; flex-direction: column; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 42px 0; }
.wordmark { font-size: 19px; font-weight: 700; letter-spacing: -.06em; text-decoration: none; white-space: nowrap; }
.wordmark > span:first-child { font-weight: 400; }
.beta-label { display: inline-block; vertical-align: middle; margin-left: .65rem; padding: .15rem .35rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--wash); color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; }
.brand-note { display: inline-block; margin-left: 1rem; font-size: 11px; font-weight: 400; letter-spacing: -.02em; color: var(--muted); }
.brand-note span { font-weight: 600; }
.header-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.8rem; font-size: 12px; }
.header-nav a { padding: .5rem 0; text-decoration: none; color: var(--muted); }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.header-nav .portal-link { color: var(--ink); }
.caption { margin: 0 0 2rem; color: var(--muted); font-size: 11px; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; }
.home .page-heading { min-height: min(730px, 78svh); padding: clamp(70px, 14vh, 160px) 0 110px; }
h1 { font-size: clamp(36px, 4.7vw, 60px); font-weight: 400; letter-spacing: -.065em; line-height: 1.17; margin: 0 0 2rem; text-wrap: balance; }
.home h1 { max-width: 23ch; }
.home h1 span { display: block; }
.intro { color: var(--muted); max-width: 56ch; }
.intro p { margin-top: 0; }
/* Keep the rule close to the label while retaining a comfortable tap target above it. */
.primary-link { display: inline-flex; align-items: flex-end; gap: 2.8rem; min-height: 44px; margin-top: 1.7rem; padding: .8rem 0 .2rem; border-bottom: 1px solid var(--ink); font-size: 14px; line-height: 1.4; text-decoration: none; }
.primary-link:hover { color: var(--focus); border-color: var(--focus); }
.home-content { border-top: 1px solid var(--rule); padding: 1rem 0 5rem; }
.prose { font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.35rem; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { font-size: 20px; font-weight: 400; line-height: 1.4; letter-spacing: -.045em; margin: 2.8rem 0 1rem; }
.prose h3 { font-size: 16px; font-weight: 500; margin: 2rem 0 1rem; }
.prose ul, .prose ol { padding-left: 1.6rem; }
.prose li + li { margin-top: .55rem; }
.prose blockquote { border-left: 2px solid var(--rule); padding-left: 1.2rem; margin-left: 0; color: var(--muted); }
.prose code { font-family: inherit; background: var(--wash); padding: .15em .3em; }
.prose pre { overflow: auto; background: var(--wash); padding: 1rem; }
.prose pre code { padding: 0; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: .7rem; text-align: left; }
.home-content .prose { max-width: 62ch; margin-left: auto; }
.home-content .prose h2 { margin-top: 3rem; }
.document { padding: 65px 0 100px; }
.document .page-heading { max-width: 68ch; margin-bottom: 3rem; }
.document h1 { font-size: clamp(32px, 4vw, 48px); }
.document .intro { max-width: none; }
.document-date { margin: -1rem 0 1.8rem; color: var(--muted); font-size: 11px; }
.document-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 3.4rem; border-top: 1px solid var(--rule); padding-top: 2rem; }
.document-layout .prose { max-width: 66ch; }
.document-layout .prose h2:first-child { margin-top: 0; }
.contents { align-self: start; position: sticky; top: 2rem; }
.contents .caption { margin-bottom: 1rem; }
.contents nav { display: flex; flex-direction: column; gap: .8rem; }
.contents a { font-size: 11px; line-height: 1.7; color: var(--muted); text-decoration: none; }
.contents a:hover { text-decoration: underline; color: var(--ink); }
.draft-note { max-width: 68ch; border-left: 2px solid var(--rule); padding: .5rem 0 .5rem 1rem; margin: 0 0 2.6rem; font-size: 12px; line-height: 1.8; color: var(--muted); }
.site-footer { margin-top: auto; border-top: 1px solid var(--rule); padding: 16px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; font-size: 11px; color: var(--muted); }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a { text-decoration: none; padding: .6rem 0; }
.footer-links a:hover { text-decoration: underline; }
.footer-status { font-size: 10px; }
.theme-control { display: flex; align-items: center; gap: .5rem; }
.theme-control select { min-height: 36px; font: inherit; color: var(--ink); background: var(--page); border: 0; cursor: pointer; }
.skip-link { position: absolute; top: 0; left: 1rem; padding: 1rem; background: var(--ink); color: var(--page); z-index: 2; transform: translateY(-120%); }
.skip-link:focus { transform: translateY(0); }
@media (max-width: 740px) {
    .site-shell { padding: 0 24px; }
    .site-header { align-items: flex-start; padding: 24px 0 16px; gap: 1rem; flex-direction: column; }
    .header-nav { width: 100%; gap: 1.5rem; }
    .header-nav .portal-link { margin-left: auto; }
    .caption { margin-bottom: 1rem; }
    .home .page-heading { min-height: auto; padding: 32px 0 40px; }
    h1 { font-size: clamp(36px, 8vw, 52px); margin-bottom: 1.25rem; }
    .primary-link { margin-top: 1rem; }
    .home-content { padding: 1.5rem 0 3rem; }
    .home-content .prose { margin-left: 0; }
    .home-content .prose h2, .prose h2 { margin-top: 2rem; }
    .home-content .prose h2:first-child { margin-top: 0; }
    .document { padding: 28px 0 48px; }
    .document .page-heading { margin-bottom: 1.5rem; }
    .document h1 { margin-bottom: 1rem; }
    .document-date { margin: 0 0 1.25rem; }
    .draft-note { margin-bottom: 1.5rem; }
    .document-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-top: 1.5rem; }
    .contents { position: static; border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; }
    .contents nav { gap: .75rem; }
    .contents a { padding: .15rem 0; }
    .site-footer { align-items: flex-start; flex-wrap: wrap; }
    .footer-status { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
    a, select { transition: color 120ms ease; }
}
