/* RFC 58008 - The Vibes Certificate Profile
   Typography and layout. Shared by index.html and 404.html so that the
   two pages cannot drift apart. */

/* ---- IBM Plex Mono, self-hosted (latin, latin-ext) ---- */

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-400-italic-latin-ext.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;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-400-italic-latin.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;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-400-latin-ext.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;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-400-latin.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;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-500-latin-ext.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;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-500-latin.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;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-600-latin-ext.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;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-600-latin.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;
}

/* ---- Document ---- */

:root {
  --paper: #FDFDFB;
  --ink: #161614;
  --soft: #6B6B66;
  --link: #1A1AB8;
  --valid: #0A7C3F;
  --rule: #C9C9C2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

html { background: var(--paper); }

body {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink);
  max-width: 82ch;
  margin: 0 auto;
  padding: 40px 20px 90px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

pre {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-x: auto;
  margin: 1.3em 0;
}

p { margin: 1.15em 0; }
.indent { padding-left: 3ch; }

h1, h2, h3 {
  font-size: inherit;
  font-weight: 600;
  margin: 2.4em 0 1em;
}
h1 { text-align: center; margin: 2.2em 0 1.6em; }

.rfc-header {
  display: flex;
  justify-content: space-between;
  gap: 2ch;
  flex-wrap: wrap;
  color: var(--ink);
}
.rfc-header div { white-space: pre-line; }
.rfc-header .right { text-align: right; }

.memo-label { font-weight: 600; margin-top: 2.2em; }

.toc { margin: 1.2em 0; }
.toc a {
  display: flex;
  color: var(--ink);
  text-decoration: none;
  gap: 0.5ch;
}
.toc a:hover .t { text-decoration: underline; color: var(--link); }
.toc .t { flex: none; }
.toc .dots {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  color: var(--soft);
}
.toc .dots::after { content: " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."; }
.toc .pg { flex: none; }

.pagebreak {
  margin: 3.2em 0;
  color: var(--soft);
  font-size: 0.92em;
}
.pagebreak .line {
  border-top: 1px solid var(--rule);
  margin-bottom: 0.35em;
}
.pagebreak .cols {
  display: flex;
  justify-content: space-between;
  gap: 2ch;
  flex-wrap: wrap;
}

.kw { font-weight: 600; }

/* Verification appendix */
.verify-form { margin: 1.4em 0 0.6em; }
.verify-form label { display: block; margin-bottom: 0.6em; }
.verify-row { display: flex; gap: 1ch; flex-wrap: wrap; }
.verify-row input {
  font-family: inherit;
  font-size: inherit;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  flex: 1;
  min-width: 24ch;
}
.verify-row button {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  padding: 7px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}
.verify-row button:hover { background: #333; }
.verify-row button:disabled { opacity: 0.6; cursor: wait; }
.verdict {
  display: none;
  margin-top: 1.2em;
  border: 1px dashed var(--rule);
  padding: 12px 14px;
  white-space: pre-wrap;
}
.verdict.show { display: block; }
.verdict .status { color: var(--valid); font-weight: 600; }

footer-spacer { display: block; height: 2em; }

@media (max-width: 640px) {
  body { font-size: 13px; padding: 26px 14px 70px; }
  .rfc-header { font-size: 0.92em; }
}

::selection { background: #FFEFAF; }

/* Issuance appendix */
.verify-row select,
.verify-form textarea {
  font-family: inherit;
  font-size: inherit;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.verify-row select { flex: none; cursor: pointer; }
.vibes-row { margin-top: 1em; }
.verify-form textarea {
  display: block;
  width: 100%;
  resize: vertical;
  line-height: inherit;
}
.issue-actions { margin-top: 1em; }
.verdict .pem {
  margin: 1em 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--rule);
  font-size: 0.86em;
  line-height: 1.45;
  white-space: pre;
  overflow-x: auto;
}
.verdict .pem-actions { margin-top: 0.9em; }
.verdict.failed .status { color: var(--ink); }
