/* Reader shell shared by generated library pages and the privacy/abuse documents. */
@import url('../shared/fonts.css');
:root {
  color-scheme: dark;
  --bg: #0c1414;
  --panel: #101c1a;
  --ink: #bddec5;
  --muted: #9ab39f;
  --accent: #eddbad;
  --line: #405b49;
  --focus: #f3eee2;
  /* The reader uses contemporary prose type; terminal and code retain Fixedsys. */
  --o-font-ui:
    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Yu Gothic', 'Microsoft YaHei',
    sans-serif;
  font: 16px/1.7 var(--o-font-ui);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: clamp(0px, 2vw, 32px);
  color: var(--ink);
  background: #070e0d;
}
a {
  color: var(--accent);
  text-underline-offset: 0.22em;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 12px;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--accent);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
/* Reader masthead, navigation, and language links. */
.library-shell {
  max-width: 1120px;
  margin: auto;
  border: 1px solid var(--line);
  background: var(--bg);
}
.masthead {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 36px 27px;
  color: #172019;
  background: #ddb868;
}
.masthead::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(
    to right,
    #ddb868 0 25%,
    #c47745 25% 46%,
    #eddbad 46% 64%,
    #aeb579 64% 81%,
    #6da698 81%
  );
}
.masthead a {
  color: inherit;
}
.masthead a:focus-visible {
  outline-color: #172019;
}
.wordmark {
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}
.wordmark span {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
}
.terminal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  text-decoration: none;
}
.primary-nav [aria-current] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.primary-nav a:hover {
  border-bottom-color: var(--muted);
}
.language-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 18px;
  padding: 2px 36px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.language-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.language-nav [aria-current] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
/* Reading typography and long-form content. */
main {
  padding: clamp(24px, 5vw, 64px);
}
main:focus {
  outline: none;
}
h1,
h2,
h3 {
  color: var(--accent);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
h1 {
  margin: 10px 0 22px;
  font-size: clamp(30px, 4.8vw, 46px);
  letter-spacing: -0.04em;
}
h2 {
  font-size: 25px;
  margin: 0 0 18px;
}
h3 {
  font-size: 19px;
  margin: 0 0 12px;
}
p {
  margin: 0 0 18px;
}
.page-heading {
  max-width: 72ch;
  margin-bottom: 40px;
}
main > p,
main > section > p,
.page-heading p {
  max-width: 68ch;
}
.library-shell .markdown-body {
  max-width: 72ch;
  line-height: 1.8;
}
.library-shell .markdown-body h1,
.library-shell .markdown-body h2,
.library-shell .markdown-body h3,
.library-shell .markdown-body h4,
.library-shell .markdown-body h5,
.library-shell .markdown-body h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.eyebrow,
.card-path {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.eyebrow {
  font-weight: 600;
}
.lede {
  font-size: 19px;
  color: var(--ink);
}
section + section {
  margin-top: 44px;
}
.reading-text {
  max-width: 76ch;
  margin: 0 0 20px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  font: 16px/1.6 var(--o-font-terminal, 'Lucida Console', monospace);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
.raw-link {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
}
/* Published collection cards and breadcrumb navigation. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-decoration: none;
}
.content-card:hover {
  border-color: var(--accent);
}
.content-card h2,
.content-card h3 {
  margin-bottom: 14px;
  font-size: 22px;
}
.content-card p {
  color: var(--ink);
  font-size: 16px;
}
.card-path {
  margin-top: auto;
  overflow-wrap: anywhere;
}
.reader-note {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.breadcrumbs {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li + li::before {
  content: '/';
  padding-right: 8px;
  color: var(--muted);
}
/* Progressively disclosed hints and published gallery media. */
.hint {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
}
summary {
  min-height: 48px;
  padding: 14px 18px;
  color: var(--accent);
  cursor: pointer;
  touch-action: manipulation;
  font-weight: 500;
}
.hint section {
  padding: 0 18px 18px;
}
.hint .reading-text {
  padding: 18px 0 0;
  border: 0;
}
.gallery {
  display: grid;
  gap: 44px;
}
.gallery--contact-sheet {
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.gallery--contact-sheet figure > img {
  aspect-ratio: auto;
}
figure {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}
figure > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #0a1111;
}
.retro-image {
  image-rendering: pixelated;
}
figcaption {
  padding: 24px;
}
figcaption h2 {
  font-size: 22px;
  margin-bottom: 12px;
}
figcaption p {
  margin-bottom: 10px;
}
/* Reader footer and compact-screen layout. */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 26px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer p {
  max-width: 560px;
  margin: 0;
}
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 620px) {
  body {
    padding: 0;
  }
  .masthead {
    padding: 18px 22px 21px;
  }
  .wordmark span {
    display: block;
    margin-top: 5px;
  }
  .primary-nav {
    padding: 0 22px;
    gap: 0 24px;
    font-size: 15px;
  }
  .language-nav {
    padding-inline: 22px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .reading-text {
    padding: 16px;
  }
  .content-card,
  figcaption {
    padding: 18px;
  }
  .lede {
    font-size: 18px;
  }
  .hint section {
    padding: 0 14px 14px;
  }
  footer {
    padding: 22px;
  }
}
