/* Times of ferdiOS — site styles, adapted from the Bootstrap 5.0 blog example. */

/* Bootstrap's Reboot turns on smooth scrolling for every anchor jump. */
:root {
  scroll-behavior: auto;
}

[data-bs-theme="dark"] {
  --bs-body-bg: #101111;
  --bs-body-bg-rgb: 16, 17, 17;
  --bs-secondary-bg: #181818;
  --bs-secondary-bg-rgb: 24, 24, 24;
  --bs-tertiary-bg: #181818;
  --bs-tertiary-bg-rgb: 24, 24, 24;
  --bs-border-color: #3a3a3a;
  --bs-border-color-translucent: rgba(255, 255, 255, .15);
}

.btn-sm {
  --bs-btn-padding-y: .375rem;
  --bs-btn-padding-x: .9rem;
}

/* Bootstrap's outline buttons are transparent with a #6c757d border in both
   themes, which leaves nothing but a faint outline on this background. */
[data-bs-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: #e4e4e4;
  --bs-btn-bg: #272727;
  --bs-btn-border-color: #4a4a4a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #353535;
  --bs-btn-hover-border-color: #666;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #3f3f3f;
  --bs-btn-active-border-color: #767676;
  --bs-btn-disabled-color: #7a7a7a;
  --bs-btn-disabled-bg: #1b1b1b;
  --bs-btn-disabled-border-color: #313131;
  --bs-btn-focus-shadow-rgb: 90, 90, 90;
}

/* text-bg-light is a hardcoded near-white in both themes. */
[data-bs-theme="dark"] .text-bg-light {
  color: #e4e4e4 !important;
  background-color: #272727 !important;
  box-shadow: inset 0 0 0 1px #4a4a4a;
}

p {
  margin-bottom: 1.5rem;
}

.blog-header {
  line-height: 1;
  border-bottom: 1px solid var(--bs-border-color);
}

/* Headings are Caslon. The masthead nameplate keeps Playfair everywhere;
   everything else only gets it on the editorial pages (front page, articles,
   editorial team, about) — see body.editorial in base.jinja2. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  margin-bottom: .85rem;
}

.blog-header-logo {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 2.25rem;
  text-decoration: none;
}

.editorial .blog-sidebar h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

.blog-header-tagline {
  margin-top: .35rem;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--bs-secondary-color);
}

.display-4 {
  font-size: 2.5rem;
}
@media (min-width: 768px) {
  .display-4 {
    font-size: 3rem;
  }
}

.nav-scroller {
  position: relative;
  z-index: 2;
  height: 2.75rem;
  overflow-y: hidden;
}

.nav-scroller .nav {
  display: flex;
  flex-wrap: nowrap;
  padding-bottom: 1rem;
  margin-top: -1px;
  overflow-x: auto;
  text-align: center;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-scroller .nav-link {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: 1rem;
}

.nav-scroller .nav > a {
  color: var(--bs-emphasis-color);
  text-decoration: none;
}

.nav-scroller .nav > a:hover,
.nav-scroller .nav > a:focus {
  color: rgba(var(--bs-link-color-rgb), 1);
}

.card-img-right {
  height: 100%;
  border-radius: 0 3px 3px 0;
}

.flex-auto {
  flex: 0 0 auto;
}

.h-250 { height: 250px; }
@media (min-width: 768px) {
  .h-md-250 { height: 250px; }
}

/* Frontpage highlight cards: clamp the summary so it can never overflow the
   fixed-height card, regardless of column width. */
.blog-card-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Pagination */
.blog-pagination {
  margin-bottom: 4rem;
}
.blog-pagination > .btn {
  border-radius: 2rem;
}

/*
 * Blog posts
 */
.blog-post {
  margin-bottom: 4rem;
}
.blog-post-title {
  margin-bottom: .25rem;
  font-size: 2.5rem;
}
.blog-post-meta {
  margin-bottom: 1.25rem;
  color: var(--bs-secondary-color);
}

/* Tables inside article prose, from markdown pipe tables. The code viewer on
   /src/ renders inside a .blog-post too, so table.src-lines is left alone. */
.blog-post table:not(.src-lines) {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
  font-size: 1rem;
}
.blog-post table:not(.src-lines) th {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  text-align: left;
  padding: .5rem .75rem;
  border-bottom: 2px solid var(--bs-border-color);
}
.blog-post table:not(.src-lines) td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--bs-border-color);
  vertical-align: top;
}
.blog-post table:not(.src-lines) tbody tr:last-child td {
  border-bottom: 0;
}
.editorial .blog-post table th {
  font-family: "Playfair Display", Georgia, serif;
}

/* Blockquotes inside article prose, from markdown "> " lines */
.blog-post blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--bs-border-color);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--bs-secondary-color);
}
.blog-post blockquote p:last-child {
  margin-bottom: 0;
}

/*
 * Footer
 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@supports (min-height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

.blog-footer {
  margin-top: auto;
  padding: .35rem 0;
  color: var(--bs-secondary-color);
  text-align: center;
  background-color: var(--bs-tertiary-bg);
  border-top: .05rem solid var(--bs-border-color);
}
.blog-footer p {
  margin-bottom: 0;
}

/*
 * Sticky sidebar
 */
.blog-sidebar {
  top: 2rem;
}

/*
 * Placeholder thumbnails
 */
.bd-placeholder-img {
  font-size: 1.125rem;
  text-anchor: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

@media (min-width: 768px) {
  .bd-placeholder-img-lg {
    font-size: 3.5rem;
  }
}

/*
 * Playfair Display, variable weight (SIL Open Font License, see
 * assets/fonts/PlayfairDisplay-OFL.txt). Masthead, and headings on the
 * editorial pages (front page, articles, editorial team, about).
 */
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-Italic-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

/*
 * Libre Caslon Text (SIL Open Font License, see assets/fonts/LibreCaslonText-OFL.txt).
 * Headline face only -- body copy stays on the browser's default serif stack.
 */
@font-face {
  font-family: "Libre Caslon Text";
  src: url("fonts/LibreCaslonText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libre Caslon Text";
  src: url("fonts/LibreCaslonText-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Libre Caslon Text";
  src: url("fonts/LibreCaslonText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/*
 * JetBrains Mono v2.304, self-hosted from assets/fonts (SIL Open Font License,
 * see assets/fonts/JetBrainsMono-OFL.txt).
 */
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

pre,
code,
kbd,
samp,
.highlight,
.console,
[class*="build-"],
[class*="src-"],
[class*="package-"],
[class*="artifact-"],
[class*="stage-"] {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
}

/*
 * Highlighted code blocks (Pygments, via the Markdown codehilite extension).
 * The colours live in pygments.css; this is just the box around them.
 */
.highlight,
code,
kbd,
samp {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
}

.highlight {
  padding: 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  border: 1px solid #30363d;
  border-radius: .25rem;
}

.highlight pre {
  margin-bottom: 0;
}

/* Bootstrap colours bare <code> pink; inside a highlighted block the token
   colours (and the style's own foreground) should win instead. */
.highlight code {
  color: inherit;
}

/*
 * Build UI — the Images and World screens.
 *
 * The console reuses the .highlight box defined above (JetBrains Mono, dark
 * background, github-dark palette from pygments.css) and only adds a line-number
 * gutter and a handful of stream colours on top of it.
 */

.build-mono,
.build-status,
.console {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

.build-mono {
  font-size: 1rem;
}

/* Status pills and glyphs */
.build-status {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35em .75em;
}
.build-status.build-status-lg {
  font-size: 1rem;
  padding: .5em 1em;
}
.build-glyph {
  display: inline-block;
  font-weight: 700;
}
.build-glyph-spin {
  animation: build-pulse 1.1s ease-in-out infinite;
}
@keyframes build-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}
@media (prefers-reduced-motion: reduce) {
  .build-glyph-spin { animation: none; }
}
/* A filter button is a label, not a live build -- the running dot stays still. */
.btn .build-glyph-spin { animation: none; }

/* The dark header panel on an image build page */
.build-header {
  background-color: #0d1117;
  color: #e6edf3;
  border-radius: .25rem;
  padding: 1.5rem;
}
.build-header a {
  color: #79c0ff;
}
.build-header h1 {
  font-size: 1.75rem;
  margin-bottom: .25rem;
  color: #e6edf3;
}
.build-header .build-subject {
  color: #8b949e;
}

/* Meta grid: label above value, wrapping into columns */
.build-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin: 0;
}
.build-meta-item dt {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: .15rem;
}
.build-header .build-meta-item dt {
  color: #8b949e;
}
.build-meta-item dd {
  margin-bottom: 0;
}

/* Build listing rows (Drone-style: coloured gutter, one row per run) */
.build-row {
  display: block;
  border: 1px solid var(--bs-border-color);
  border-left-width: .3rem;
  border-radius: .25rem;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  text-decoration: none;
  color: inherit;
  transition: background-color .12s ease-in-out;
}
.build-row:hover,
.build-row:focus {
  background-color: var(--bs-tertiary-bg);
  color: inherit;
}
.build-row-success   { border-left-color: var(--bs-success); }
.build-row-failure   { border-left-color: var(--bs-danger); }
.build-row-running   { border-left-color: var(--bs-warning); }
.build-row-queued,
.build-row-cancelled { border-left-color: #adb5bd; }

.build-row-number {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bs-emphasis-color);
}
.build-row-title {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 1.05rem;
  margin-bottom: .1rem;
}
.build-row-meta {
  font-size: 1rem;
  color: var(--bs-secondary-color);
}
.build-row-meta > span + span::before {
  content: "·";
  margin: 0 .5rem;
  color: var(--bs-border-color);
}

/* Stage list on an image build page */
.stage-list .nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  border-radius: 0;
  border-left: 3px solid transparent;
  color: var(--bs-body-color);
  padding: .6rem .75rem;
  font-size: 1rem;
}
.stage-list .nav-link:hover {
  background-color: var(--bs-tertiary-bg);
}
.stage-list .nav-link.active {
  background-color: #0d1117;
  color: #e6edf3;
  border-left-color: #79c0ff;
}
.stage-list .nav-link .stage-duration {
  margin-left: auto;
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  opacity: .7;
}

/* Console output */
.console {
  padding: .75rem 0;
  max-height: 34rem;
  overflow: auto;
}
.console pre {
  margin: 0;
}
.console-line {
  display: block;
  padding: 0 .75rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.console-line:hover {
  background-color: #161b22;
}
.console-lineno {
  display: inline-block;
  width: 3.5rem;
  padding-right: 1rem;
  text-align: right;
  color: #6e7681;
  user-select: none;
  vertical-align: top;
}
.console-text {
  display: inline-block;
  max-width: calc(100% - 3.5rem);
  vertical-align: top;
}
.console-cmd  .console-text { color: #d2a8ff; font-weight: 700; }
.console-warn .console-text { color: #d29922; }
.console-err  .console-text { color: #ff7b72; }
.console-ok   .console-text { color: #3fb950; }

/* Artifacts and package tables */
.artifact-name {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  word-break: break-all;
}
.artifact-sha {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  color: var(--bs-secondary-color);
  word-break: break-all;
}

.package-table {
  font-size: 1rem;
}
.package-table th {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}
/*
 * One row is one line. Every cell holds its line and a long value is clipped;
 * the package name is the single exception -- it may wrap, and it gets the
 * width the other columns give up.
 */
.package-table th,
.package-table td {
  white-space: nowrap;
}
.package-table td.package-name {
  white-space: normal;
}
.package-licence {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.package-table td.package-name a {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  text-decoration: none;
}
.package-table td.package-version {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* Sortable column headers in the package table */
th.sortable {
  cursor: pointer;
  user-select: none;
}
th.sortable::after {
  content: "↕";
  margin-left: .35rem;
  opacity: .35;
}
th.sortable[aria-sort="ascending"]::after  { content: "↑"; opacity: 1; }
th.sortable[aria-sort="descending"]::after { content: "↓"; opacity: 1; }

/* Definition table on a package page, in the style of a distro package browser */
.package-facts th {
  width: 12rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  vertical-align: top;
}
.package-facts td {
  font-size: 1rem;
}

.package-section-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.build-section-title,
.about-eyebrow {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.editorial .about-eyebrow {
  font-family: "Playfair Display", Georgia, serif;
}

.theme-toggle {
  line-height: 1;
}

.theme-icon {
  display: none;
  vertical-align: -.125em;
}

[data-bs-theme="light"] .theme-icon-moon,
[data-bs-theme="dark"] .theme-icon-sun {
  display: inline-block;
}

.build-header,
.highlight {
  color-scheme: dark;
}

/* Credible sources — the repository browser at /src/. */

.src-mono,
.src-sha,
.src-name,
.src-crumbs {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
}

.src-header {
  margin-bottom: 1rem;
}

/* Scoped to the repository header so article titles keep their own size. */
.src-header .blog-post-title,
.src-org-title {
  font-size: 2rem;
}

/*
 * Groups flow down two CSS columns rather than sitting in a grid row, so a
 * three-repository group is three repositories tall next to a long one.
 */
.src-groups {
  column-count: 2;
  column-gap: 1.5rem;
}

@media (max-width: 767.98px) {
  .src-groups {
    column-count: 1;
  }
}

.src-group {
  display: inline-block;
  width: 100%;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  overflow: hidden;
}

.src-group-title {
  border-bottom: 1px solid var(--bs-border-color);
  border-left: 3px solid #58a6ff;
  background-color: var(--bs-tertiary-bg);
  letter-spacing: .02em;
}

.src-group-count {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  color: var(--bs-secondary-color);
}

.src-repo-item + .src-repo-item {
  border-top: 1px solid var(--bs-border-color);
}

.src-repo-item.src-repo-first {
  border-top: 0;
}

.src-filters {
  background-color: var(--bs-tertiary-bg);
}

.src-filter-groups .form-check-label {
  font-size: 1rem;
}

.src-repo-item:hover {
  background-color: var(--bs-tertiary-bg);
  cursor: pointer;
}

.src-repo-name {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 500;
}

.src-repo-name a {
  text-decoration: none;
}

.src-repo-name a:hover {
  text-decoration: none;
  color: var(--bs-link-hover-color);
}

.src-repo-desc {
  font-size: 1rem;
  color: var(--bs-secondary-color);
}

.src-repo-meta {
  font-size: 1rem;
  color: var(--bs-secondary-color);
}

.src-repo-dot {
  opacity: .6;
}

.src-toolbar {
  margin-top: .25rem;
  column-gap: .5rem;
  row-gap: 1rem;
}

.src-clone-panel {
  width: auto;
  max-width: 100%;
}

.src-clone-panel .src-clone-url {
  width: 22rem;
  max-width: 40vw;
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
}

.src-clone-panel .src-clone-url:focus {
  border-color: var(--bs-border-color);
  box-shadow: none;
}

.src-clone-panel .btn {
  --bs-btn-padding-x: .7rem;
}

.src-clone-panel .src-clone-proto.active {
  --bs-btn-color: #fff;
  --bs-btn-bg: #0d6efd;
  --bs-btn-border-color: #0d6efd;
}

.src-clone-copied {
  --bs-btn-color: #fff;
  --bs-btn-bg: #3fb950;
  --bs-btn-border-color: #3fb950;
}

.src-latest {
  border: 1px solid var(--bs-border-color);
  border-top-left-radius: .25rem;
  border-top-right-radius: .25rem;
  background-color: var(--bs-tertiary-bg);
  font-size: 1rem;
}

.src-latest-author {
  font-weight: 600;
  margin-right: .5rem;
}

.src-latest-message {
  color: var(--bs-body-color);
  text-decoration: none;
}

a.src-latest-message:hover {
  color: var(--bs-link-hover-color);
  text-decoration: none;
}

.src-latest-date {
  margin-left: .5rem;
  color: var(--bs-secondary-color);
}

.src-files {
  border-radius: .25rem;
}

.src-latest + .src-files {
  border-top: 0 !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.src-files table {
  margin-bottom: 0;
}

.src-files td {
  padding: .45rem 1rem;
  border-bottom-color: var(--bs-border-color);
}

.src-files tr:last-child td {
  border-bottom: 0;
}

.src-files .src-name {
  width: 100%;
  font-size: 1rem;
}

.src-files .src-name a {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  text-decoration: none;
}

.src-files .src-name a:hover {
  text-decoration: none;
  color: var(--bs-link-hover-color);
}

/* The size column sits in from the edge rather than jammed against the border. */
.src-files .src-size {
  width: 1%;
  padding-left: 2rem;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.src-icon {
  width: 18px;
  height: 18px;
  vertical-align: -.2em;
  margin-right: .2rem;
  color: var(--bs-secondary-color);
}

.src-icon-dir {
  color: rgb(255, 191, 0);
}

.src-locked-name {
  color: var(--bs-secondary-color);
  cursor: not-allowed;
}

.src-commits {
  padding-left: 1rem;
  padding-right: 1rem;
}

.src-commit {
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.src-commit + .src-commit {
  border-top: 1px solid var(--bs-border-color);
}

.src-commit-main {
  min-width: 0;
}

.src-commit-subject {
  overflow-wrap: anywhere;
  margin-bottom: .15rem;
}

.src-commit-subject a {
  text-decoration: none;
}

.src-commit-subject a:hover {
  text-decoration: none;
  color: var(--bs-link-hover-color);
}

/* Bootstrap paints a bare <code> element pink; a hash reads as a link instead. */
.src-sha,
code.src-sha {
  padding: .15rem .4rem;
  border-radius: .25rem;
  color: var(--bs-link-color);
  background-color: var(--bs-tertiary-bg);
}

.src-sha-link {
  text-decoration: none;
}

.src-sha-link:hover .src-sha {
  color: var(--bs-link-hover-color);
  background-color: var(--bs-secondary-bg);
}

.src-additions {
  color: #3fb950;
}

.src-deletions {
  color: #f85149;
}

.src-changed-files li + li {
  margin-top: .25rem;
}

.src-status {
  display: inline-block;
  width: 1rem;
  text-align: center;
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
}

.src-status-renamed {
  color: #58a6ff;
}

.src-status-modified {
  color: rgb(255, 191, 0);
}

/*
 * File view. .highlight carries the github-dark background and foreground from
 * pygments.css, exactly as it does for a code fence in an article; the table
 * inside it only adds the line-number gutter.
 */
.src-blob {
  padding: .75rem 0;
}

/* On the file view the box hangs off the meta bar above it. */
.src-blob-attached .src-blob {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Diff insertions. pygments.css is generated, so the tweak lives here instead --
   blog.css is loaded last, which is enough to win. */
.highlight .gi {
  background-color: #0F53236B;
}

.src-lines {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.src-lines td {
  padding: 0;
  border: 0;
  vertical-align: top;
  line-height: 1.5;
}

.src-lineno {
  position: sticky;
  left: 0;
  width: 1%;
  padding: 0 1.25rem 0 .75rem !important;
  text-align: right;
  user-select: none;
  white-space: nowrap;
  background-color: #0d1117;
}

.src-blob .src-lineno a {
  display: block;
  color: #6e7681;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.src-blob .src-lineno a:hover,
.src-blob .src-lineno a:focus {
  color: #e6edf3;
  text-decoration: none;
  outline: 0;
}

.src-linecode {
  width: 100%;
  padding-right: 1rem !important;
  white-space: pre;
}

/* Target of #L95 or #L161-L166. */
.src-line-hl td {
  background-color: rgba(187, 128, 9, .2);
}

.src-line-hl .src-lineno {
  box-shadow: inset 2px 0 0 #bb8009;
}

.src-blob .src-line-hl .src-lineno a {
  color: #e6edf3;
}

.src-blob-meta {
  border-bottom: 0;
}

/* README, as rendered by Gitea's markdown endpoint. */
.src-readme {
  margin-bottom: 2rem;
}

.src-readme > :last-child {
  margin-bottom: 0;
}

.src-readme img {
  max-width: 100%;
}

.src-readme table {
  width: auto;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.src-readme th,
.src-readme td {
  padding: .35rem .75rem;
  border: 1px solid var(--bs-border-color);
}

.src-readme pre.code-block {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: .25rem;
  background-color: var(--bs-tertiary-bg);
}

.src-readme pre.code-block code {
  color: inherit;
}

/* Row hover, the same shade the repository list on /src/ uses. */
.table-hover {
  --bs-table-hover-bg: var(--bs-tertiary-bg);
  --bs-table-hover-color: var(--bs-body-color);
}

/* Table rows that lead somewhere: /images sends a row to its build page. */
tr.row-link {
  cursor: pointer;
}

/*
 * Text floor. Body text reads at 16px, so Bootstrap's own small text -- .small,
 * the small form controls, code and badges -- is pulled back up to the body size.
 * .btn-sm is deliberately left out: a small button should look like one.
 */
small,
.small,
.form-control-sm,
.form-select-sm,
.badge,
code,
kbd,
.form-text,
.blockquote-footer {
  font-size: 1rem;
}

/* A long section or maintainer is clipped rather than allowed to wrap. */
.package-description,
.package-maintainer {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
