@charset "UTF-8";


:root {
    --page-width: 47rem;
    --content-width: 33rem;
    --page-margin: clamp(1rem, calc(100vw - var(--page-width)), 4rem);
}

/* === Base === */

body {
    max-width: var(--page-width);
    margin-left: var(--page-margin);
    margin-right: auto;
    padding-left: 2rem;
    padding-top: 1rem;
    padding-bottom: 25vh;
    font-family: var(--body-font-family, system-ui, sans-serif);
    font-size: 16px;
    line-height: 1.4;
    background-color: #ffffff;
    color: #111;
    hyphens: auto;
    overflow-wrap: break-word;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures;
}

#content {
    max-width: var(--content-width);
}

img {
    max-width: 100%;
    height: auto;
}

mark {
    background: #fff3cd;
    color: inherit;
    padding: 0 0.1em;
    font-weight: 700;
}

/* === Typography === */

h1, h2, h3, h4, h5, h6 {
    font-family: "Lato", system-ui, sans-serif;
    font-variant-numeric: lining-nums;
}

h1 {
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.7rem;
    line-height: 1.2;
}

h2 {
    font-weight: 400;
    margin-top: 3rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    line-height: 1.2;
    color: #005a9c;
    position: relative;
}

h3 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    line-height: 1.2;
    color: #005a9c;
    position: relative;
}

h4, h5, h6 {
    font-weight: 600;
    color: #005a9c;
    position: relative;
}

p {
    margin-top: 0;
    margin-bottom: 1em;
}

/* === Lists === */

ul, ol {
    padding-left: 1.5em;
    margin: 1em 0;
}

li + li {
    margin-top: 0.4em;
}

li > ul, li > ol {
    margin: 0.3em 0;
}

li > p {
    margin: 0.5em 0 0.5em 0;
}

dt {
    font-weight: 700;
    margin-top: 0.5em;
}

dd {
    margin: 0 0 0.5em 2em;
}

/* === Tables === */

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2em 0;
    font-size: 0.95em;
}

th, td {
    border: none;
    padding: 0.4em 0.8em;
    text-align: left;
    vertical-align: top;
}

th {
    font-weight: 700;
    font-family: "Lato", system-ui, sans-serif;
}

thead {
    border-bottom: 2px solid #111;
}

thead th {
    padding-bottom: 0.5em;
}

tbody tr + tr {
    border-top: 1px solid #e0e0d8;
}

/* === Inline code === */

code {
    font-family: "Fira Mono", monospace;
    font-size: 0.9375em;
    padding: 0.1em 0.3em;
    border-radius: 2px;
}

/* === Code blocks (details/summary) === */

details.code-block {
    margin-top: 1.2em;
    margin-bottom: 1.2em;
    margin-right: calc(var(--content-width) - var(--page-width));
    width: auto;
    max-width: calc(100vw - 2rem);
}

details.code-block > summary {
    font-family: "Lato", system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #005a9c;
    padding: 0.75em 1em;
    cursor: pointer;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
}

details.code-block > summary::-webkit-details-marker {
    display: none;
}

details.code-block > summary::after {
    content: " ▾";
}

details.code-block[open] > summary::after {
    content: " ▴";
}

details.code-block[open] > summary {
    border-bottom: 1px solid #eee;
    border-radius: 6px 6px 0 0;
}

details.code-block .sourceCode {
    background-color: transparent;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

details.code-block pre {
    margin: 0;
    padding: 0.75em 1em;
    background: none;
    border: none;
    border-radius: 0;
    font-family: "Fira Mono", monospace;
    font-size: 0.65em;
    line-height: 1.5;
    overflow-x: auto;
    hyphens: none;
}

details.code-block pre > code {
    background: none;
    padding: 0;
    font-size: 13px;
    border-radius: 0;
}

details.code-block pre a[aria-hidden="true"] {
    text-decoration: none;
    color: inherit;
}

details.code-block pre span[id^="cb"] a {
    text-decoration: none;
    color: inherit;
}

/* === Syntax highlighting === */

.sourceCode .kw {
    font-weight: 700;
    color: #a31d1d;
}

.sourceCode .co {
    color: #888;
}

.sourceCode .dt {
    font-weight: 700;
    color: #005a9c;
}

.sourceCode .op {
    color: #555;
}

.sourceCode .bn {
    font-weight: 700;
    color: #a31d1d;
}

.sourceCode .ot {
    font-weight: 700;
    color: #a31d1d;
}

.sourceCode .re {
    color: #555;
}

.sourceCode .v {
    font-style: italic;
}

.sourceCode .an {
    color: #555;
}

/* === Bibliography === */

div#refs {
    margin: 1em 0;
}

div.csl-bib-body {
    margin: 1em 0;
}

div.csl-entry {
    margin-bottom: 0.5em;
    line-height: 1.5;
}

/* === RFD metadata === */

table.rfd-meta {
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
    border-collapse: collapse;
    width: auto;
}

table.rfd-meta th {
    font-family: "Lato", system-ui, sans-serif;
    font-weight: 600;
    color: #555;
    text-align: left;
    padding: 0.2em 1.5em 0.2em 0;
    white-space: nowrap;
    border: none;
}

table.rfd-meta td {
    padding: 0.2em 0;
    border: none;
}

table.rfd-meta .rfd-state {
    display: inline-block;
    font-size: 0.8rem;
    font-family: "Lato", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    padding: 0.1em 0.5em;
    border-radius: 3px;
}

table.rfd-meta .email {
    color: #005a9c;
    text-decoration: none;
}

table.rfd-meta .email::before {
    content: "<";
}

table.rfd-meta .email::after {
    content: ">";
}

.rfd-state.ideation      { background: #e8e8e8; color: #555; }
.rfd-state.prediscussion { background: #fff3cd; color: #664d03; }
.rfd-state.discussion    { background: #cfe2ff; color: #084298; }
.rfd-state.published     { background: #d1e7dd; color: #0f5132; }
.rfd-state.committed     { background: #0f5132; color: #fff; }
.rfd-state.abandoned     { background: #f8d7da; color: #842029; }

/* === TOC (bottom bar) === */

/* === Bottom bar === */

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-top: 2px solid #005a9c;
    z-index: 100;
    box-sizing: border-box;
    padding: 0 calc(var(--page-margin) + 2rem);
}

.bottom-bar-inner {
    width: 100%;
    max-width: var(--content-width);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#toc-cb {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    pointer-events: none;
    outline: none;
}

#toc-label {
    cursor: pointer;
    font-family: "Lato", system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #005a9c;
    letter-spacing: 0.02em;
    outline: none;
}

#toc-label::after {
    content: " \25B4";
    margin-left: 0.3em;
}

#toc-cb:checked + #toc-label::after {
    content: " \25BE";
}

nav#TOC {
    position: fixed;
    bottom: 2.5rem;
    left: calc(var(--page-margin) + 2rem);
    right: auto;
    max-width: var(--content-width);
    width: max-content;
    z-index: 99;
    background: #ffffff;
    border-top: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
    box-sizing: border-box;
}

nav#TOC .toc-inner {
    padding: 1rem 1rem 1.5rem;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
}

#toc-title {
    display: none;
}

nav#TOC ul {
    list-style: none;
    padding: 0 0 0 1.5em;
    margin: 0;
}

nav#TOC a {
    display: block;
    padding: 0.15rem 0;
    color: #111;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.6;
}

nav#TOC a:hover {
    color: #005a9c;
}

section[id], h2[id], h3[id], h4[id] {
    scroll-margin-bottom: 3rem;
}

/* === RFD metadata === */

#search-wrap {
    display: flex;
    align-items: center;
}

#search-input {
    height: 1.5rem;
    border: 1px solid #aaa;
    border-radius: 3px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    font-family: inherit;
    background: #fff;
    color: #111;
    width: 10rem;
    outline: none;
    transition: width 0.2s, border-color 0.15s;
    -webkit-appearance: none;
}

#search-input:focus {
    border-color: #005a9c;
    box-shadow: 0 0 0 2px rgba(0, 90, 156, 0.15);
    width: 14rem;
}

#search-output {
    position: fixed;
    bottom: 2.5rem;
    right: calc(var(--page-margin) + 2rem);
    background: #fff;
    border: 1px solid #005a9c;
    border-bottom: 2px solid #005a9c;
    max-height: 60vh;
    overflow-y: auto;
    min-width: 22rem;
    max-width: 30rem;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.08);
    z-index: 200;
    box-sizing: border-box;
}

#search-wrap .to-landing {
    font-family: "Lato", system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #005a9c;
    text-decoration: underline;
    margin-left: 0.75rem;
    white-space: nowrap;
}

#search-wrap .to-landing:hover {
    color: #003d6b;
}

.search-message {
    font-size: 0.78rem;
    color: #555;
    font-style: italic;
    margin: 0;
    padding: 0.4rem 0.75rem;
    background: #f8f8f4;
    border-bottom: 1px solid #e0e0d8;
}

.search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-result {
    border-bottom: 1px solid #eee;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result a {
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #111;
}

.search-result:hover {
    background: #f0f0e8;
}

.search-result-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #005a9c;
}

.search-result-excerpt {
    display: block;
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.15rem;
    line-height: 1.4;
}

.search-result-excerpt + .search-result-excerpt {
    margin-top: 0.1rem;
}

/* === Landing page === */

.search-bar {
    margin: 1.5rem 0;
    position: relative;
}

.search-bar input {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border: 2px solid #bbb;
    border-radius: 4px;
    width: 100%;
    max-width: 600px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

.search-bar input:focus {
    border-color: #005a9c;
    box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.15);
}

.search-bar input::placeholder {
    color: #888;
}

.search-bar #search-output {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 600px;
    min-width: 0;
    max-height: 60vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #005a9c;
    border-bottom: 2px solid #005a9c;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    z-index: 200;
}

/* === Freshness badges === */
.rfd-freshness {
    display: inline-block;
    font-size: 0.8rem;
    font-family: "Lato", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    padding: 0.1em 0.5em;
    border-radius: 3px;
}

.rfd-freshness.fresh  { background: #d1e7dd; color: #0f5132; }
.rfd-freshness.stale  { background: #fff3cd; color: #664d03; }
.rfd-freshness.rotten { background: #f8d7da; color: #842029; }
.rfd-freshness.unknown { background: #e8e8e8; color: #555; }   /* invalid value → gray */

/* === Inspired / inspired-by links === */
table.rfd-meta .rfd-link {
    color: #005a9c;
    text-decoration: none;
}
table.rfd-meta .rfd-link:hover {
    text-decoration: underline;
}
