/* Palette taken from phrack.org. */
:root {
  --black: #000;
  --blue: #00a;
  --cyan: #0aa;
  --gray: #555;
  --silver: #aaa;
  --bright-blue: #55f;
  --bright-cyan: #5ff;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 2px;
  background: var(--black);
  color: var(--white);
  font: 1rem sans-serif;
}

a:link, a:visited { color: var(--white); font-weight: 700; text-decoration: none; }
a:hover, a:active { text-decoration: underline; }

.nav {
  text-align: center;
  letter-spacing: 1px;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem;
}

header { text-align: center; }
.logo img {
  display: inline-block;
  margin: 1.5rem 0;
  max-width: 100%;
  height: auto;
}

.around {
  display: block;
  max-width: 57rem;
  margin: 0 auto;
  border: 1px solid var(--gray);
  padding: 1px;
}

.opt {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  background: var(--cyan);
  color: var(--black);
  border-bottom: 1px solid var(--black);
  padding: 0.3rem 0.3rem 0.3rem 0.5rem;
}

.opt-bottom {
  background: var(--silver);
  color: var(--black);
  border-bottom: 1px solid var(--black);
  padding: 0.3rem 0.3rem 0.3rem 0.5rem;
}

.opt a, .opt-bottom a { color: var(--black); }

.tissue {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.tissue td {
  padding: 0.25rem 0.4rem;
  vertical-align: top;
  color: var(--white);
  background: color-mix(in srgb, var(--bright-blue) 70%, var(--blue));
  border-bottom: 1px solid var(--gray);
}
.tissue tr:nth-child(odd) td { background: var(--blue); }
.tissue td:last-child { text-align: right; white-space: nowrap; }
.tissue a { font-weight: 400; }
.tissue tr:hover td { background: var(--black); color: var(--bright-cyan); }
.tissue tr:hover a { color: var(--bright-cyan); }

.framed { border-top: 1px solid var(--black); border-bottom: 2px solid var(--black); }

.article {
  display: block;
  background: var(--white);
  color: var(--black);
  font: 1rem/1.5 monospace;
  padding: 0.4rem 1.5rem 1.5rem;
  overflow-x: auto;
  container-type: inline-size;
  font-variant-ligatures: none;
}
@media (max-width: 40rem) {
  .article { padding-inline: 0.75rem; }
}
.article a:link, .article a:visited { color: var(--blue); }
.article pre {
  background: #f4f4f4;
  border: 1px solid var(--black);
  border-radius: 0.8rem;
  padding: 0.6rem;
  overflow-x: auto;
}
.article img { max-width: 100%; height: auto; }
/* Two banners: 75 columns, and 42 for boxes too narrow to fit 75 at
   full size (75 * 0.61 = 45.75rem). The font shrinks only if even
   42 columns don't fit. 0.61em: a generous monospace glyph width. */
.article .banner {
  width: fit-content;
  margin: 1em auto 2em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: hidden;
  line-height: 1.2;
  font-size: min(1rem, 100cqi / 75 / 0.61);
}
.article .banner-narrow { display: none; font-size: min(1rem, 100cqi / 42 / 0.61); }
@container (max-width: 45.75rem) {
  .article .banner-wide { display: none; }
  .article .banner-narrow { display: block; }
}

/* Alerts: Org special blocks and Markdown GitHub alerts. */
.article :is(.note, .tip, .important, .warning, .caution) {
  margin: 1em 0;
  border: 1px solid var(--black);
  padding: 0 0.6rem;
}
.article :is(.note, .tip, .important, .warning, .caution)::before {
  display: block;
  margin: 0 -0.6rem;
  background: var(--cyan);
  border-bottom: 1px solid var(--black);
  padding: 0.3rem 0.3rem 0.3rem 0.5rem;
  font-weight: 700;
}
.article .note::before { content: "NOTE"; }
.article .tip::before { content: "TIP"; }
.article .important::before { content: "IMPORTANT"; }
.article .warning::before { content: "WARNING"; }
.article .caution::before { content: "CAUTION"; }

footer {
  max-width: 57rem;
  margin: 0 auto;
  text-align: right;
  border-top: 1px solid var(--gray);
  padding: 0.3rem;
  font-size: 0.85rem;
}

/* Code: Org (htmlize classes) and pandoc (short classes). */
.org-keyword, .kw, .cf { color: var(--blue); font-weight: 700; }
.org-string, .st { color: #a50; }
.org-comment, .org-comment-delimiter, .co { color: var(--gray); font-style: italic; }
.org-function-name, .fu, .bu { color: #0a0; }
.org-type, .dt { color: #a0a; }
.org-constant, .dv, .cn { color: #a00; }
