@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/geist-normal-latin.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/geist-mono-normal-latin.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fonts/newsreader-normal-latin.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 360; font-display: swap; src: url(fonts/newsreader-italic-latin.woff2) format("woff2"); }

:root {
  --paper: #F6F4EE; --paper-2: #ECE8DE;
  --ink: #16150F; --ink-2: #2D2B25; --muted: #5A574E;
  --rule: #D6D1C4; --accent: #7A5A0B; --selection: #E6D8AF;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171612; --paper-2: #24221D;
    --ink: #EEEAE0; --ink-2: #D6D1C4; --muted: #A39E91;
    --rule: #34322B; --accent: #D3B064; --selection: #4A3F22;
  }
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink-2);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
}
::selection { background: var(--selection); color: var(--ink); }
a { color: var(--accent); text-underline-offset: .15em; }

.site-head, main, .site-foot { max-width: 46rem; margin: 0 auto; padding: 0 20px; }
.site-head {
  padding-top: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
}
.site-head a { color: var(--muted); text-decoration: none; }
.site-foot { padding-top: 24px; padding-bottom: 48px; color: var(--muted); font-size: .9375rem; }
main { padding-top: 8px; padding-bottom: 40px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.2; }
h1 { font-size: 2.25rem; letter-spacing: -.01em; margin: 1.2em 0 .5em; }
h2 { font-size: 1.625rem; margin: 2em 0 .5em; padding-top: .6em; border-top: 1px solid var(--rule); }
h3 { font-size: 1.3125rem; margin: 1.6em 0 .4em; }
h4 { font-size: 1.125rem; margin: 1.4em 0 .3em; }
p, ul, ol, dl, pre, table { margin: 0 0 1em; }
li { margin-bottom: .3em; }
dt { font-weight: 600; color: var(--ink); }
dd { margin: 0 0 .8em 1.5em; }
dfn { font-style: italic; }

code, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--paper-2); padding: .08em .3em; border-radius: 3px; }
pre { background: var(--paper-2); padding: 14px 16px; overflow-x: auto; line-height: 1.5; border-radius: 4px; }
pre code { background: none; padding: 0; }

table { border-collapse: collapse; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--rule); padding: .35em .7em; text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--ink); background: var(--paper-2); }

/* Notice at the top of each page: this text is a rewrite, the source is normative. */
.ste-note {
  margin-top: 20px; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--paper-2); font-size: .9375rem;
}

/* A word that replaces a BCP 14 key word. The source key word shows on hover or focus. */
.kw { border-bottom: 1px dotted var(--accent); position: relative; cursor: help; }
.kw:hover::after, .kw:focus::after {
  content: "Source: " attr(data-bcp14);
  position: absolute; left: 0; bottom: 1.6em; white-space: nowrap; z-index: 1;
  background: var(--ink); color: var(--paper); padding: .15em .5em; border-radius: 3px;
  font-family: var(--mono); font-size: .75rem;
}

a.ref { font-family: var(--mono); font-size: .8em; text-decoration: none; }
.refs dt { font-family: var(--mono); font-size: .875rem; font-weight: 400; }
.note { padding-left: 14px; border-left: 3px solid var(--rule); }

/* Added context. This text is outside the source and outside the normative text. */
.context {
  margin: 0 0 1em; padding: 8px 14px; border: 1px dashed var(--rule); border-radius: 4px;
  color: var(--ink-2); font-size: .9375rem;
}
.context p { margin: 0 0 .5em; }
.context-label { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.context .context-src { margin: 0; font-size: .8125rem; color: var(--muted); }

/* With context.js, each aside is hidden behind an inline icon and opens in a side panel. */
.context-js aside.context { display: none; }
.context-btn {
  display: inline-flex; vertical-align: -.2em; padding: 2px; margin: 0;
  border: 0; border-radius: 50%; background: none; color: var(--accent); cursor: pointer; line-height: 0;
}
.context-btn:hover, .context-btn[aria-expanded="true"] { background: var(--selection); }
.context-btn:focus-visible, .context-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.context-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10; width: min(22rem, 100vw);
  overflow-y: auto; padding: 16px 20px 24px; background: var(--paper);
  border-left: 1px solid var(--rule); box-shadow: -6px 0 24px rgba(0, 0, 0, .12);
  font-size: .9375rem; color: var(--ink-2);
  transform: translateX(100%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s;
}
.context-open .context-panel { transform: none; visibility: visible; transition: transform .2s ease; }
.context-panel:focus { outline: none; }
.context-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.context-close {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 1.5rem; line-height: 1; padding: 2px 6px; border-radius: 4px;
}
.context-close:hover { background: var(--paper-2); color: var(--ink); }
.context-panel-body p, .context-panel-body ul { margin: 0 0 .8em; }
.context-panel-body .context-src { margin-top: 1.2em; font-size: .8125rem; color: var(--muted); }
/* On a wide screen, the text moves left to make room for the panel. */
@media (min-width: 72rem) {
  .context-open .site-head, .context-open main, .context-open .site-foot {
    margin-left: max(0px, calc((100vw - 22rem - 46rem) / 2)); margin-right: auto;
  }
}
@media (prefers-reduced-motion: reduce) { .context-panel, .context-open .context-panel { transition: none; } }
.katex { font-size: 1.05em; }
.katex-display { overflow-x: auto; overflow-y: hidden; }

/* Protocol specification pages: text that is specific to one network upgrade has the color of that upgrade,
   as in the source PDF. The Introduction page has the list of colors. */
:root {
  --nu-sapling: #1b7a2f; --nu-blossom: #b3261e; --nu-heartwood: #b85c00; --nu-canopy: #7b2fa8;
  --nu-nu5: #4a5fc1; --nu-nu6: #c2187a; --nu-nu6-1: #7a1030; --nu-nu6-2: #7a4a1e;
  --nu-nu6-3: #0b6fd6; --nu-nu7: #0b7a75;
}
@media (prefers-color-scheme: dark) {
  :root {
    --nu-sapling: #6cc37e; --nu-blossom: #f0766a; --nu-heartwood: #f0a04b; --nu-canopy: #c08be8;
    --nu-nu5: #93a3f5; --nu-nu6: #f07ab8; --nu-nu6-1: #d9607a; --nu-nu6-2: #c79a6b;
    --nu-nu6-3: #5aa9ff; --nu-nu7: #4fc9c0;
  }
}
.nu-sapling { color: var(--nu-sapling); } .nu-blossom { color: var(--nu-blossom); }
.nu-heartwood { color: var(--nu-heartwood); } .nu-canopy { color: var(--nu-canopy); }
.nu-nu5 { color: var(--nu-nu5); } .nu-nu6 { color: var(--nu-nu6); }
.nu-nu6-1 { color: var(--nu-nu6-1); } .nu-nu6-2 { color: var(--nu-nu6-2); }
.nu-nu6-3 { color: var(--nu-nu6-3); } .nu-nu7 { color: var(--nu-nu7); }
