@font-face {
  font-family: "RethinkSans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  font-optical-sizing: auto;
  src: url(/fonts/RethinkSans.ttf);
}
@font-face {
  font-family: "RethinkSans";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  font-optical-sizing: auto;
  src: url(/fonts/RethinkSans-Italic.ttf);
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/IBMPlexMono-Regular.ttf) format('truetype');
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/IBMPlexMono-SemiBold.ttf) format('truetype');
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/IBMPlexMono-Italic.ttf) format('truetype');
}

:root {
  --fg: #112;
  --fg-dim: #666;
  --fg-headers: #222;
  --bg: #d3d1d1;
  --bg-alt: #dedddd;
  --border: #888;
  --link: #223377;
  --link-dim: #334477;
  --add-bg: #cdd6cd;
  --add-fg: #2e7d32;
  --del-bg: #d9cdcd;
  --del-fg: #c62828;
  --color-dim: #334;
  --color-dimmer: #666;
  --color-secondary: #225533;
  --color-highlight: #223377;
  --color-highlight-dim: #334477;
  --mono: "IBM Plex Mono", monospace;
  --sans: "RethinkSans", sans-serif;
}

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

::selection {
  color: var(--bg);
  background: var(--link);
}

.container {
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

code, pre, kbd { font-family: var(--mono); font-size: 0.875rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Nav --- */

.repo-nav {
  border-bottom: 1px solid var(--border);
  margin: 0 0 1rem;
  padding: 0.25rem 0 0;
  display: flex;
  align-items: flex-end;
}
.repo-name {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: -1px;
  padding: 0.5rem 0;
}
.repo-name a { color: var(--fg); text-decoration: none; }
.repo-name a:hover { text-decoration: underline; }
.repo-name .logo-link { text-decoration: none; align-self: center; line-height: 0; }
.repo-name .logo-link:hover { text-decoration: none; }
.repo-name .logo { width: 16px; height: 16px; display: block; }
.repo-desc {
  color: var(--fg-dim);
  font-size: 1rem;
  font-weight: 400;
}
.tab {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  color: var(--fg-dim);
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
  text-decoration: none;
  font-size: 1rem;
}
.tab:hover {
  color: var(--fg);
  text-decoration: none;
}
.tab.active {
  color: var(--fg);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 4px 4px 0 0;
  background: var(--bg);
}
.tab.tab-mono {
  font-family: var(--mono);
  font-size: 0.875rem;
}
.repo-nav .tab:first-of-type { margin-left: auto; }
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1.5rem;
  align-self: flex-end;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}
.repo-nav .repo-name + .nav-auth { margin-left: auto; }
.nav-btn { color: var(--fg); }
.nav-btn:hover { color: var(--fg); }

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.avatar-menu {
  position: relative;
}
.avatar-menu summary {
  list-style: none;
  cursor: pointer;
  line-height: 0;
}
.avatar-menu summary::-webkit-details-marker { display: none; }
.avatar-dropdown {
  position: absolute;
  right: 0;
  z-index: 10;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0 0 4px 4px;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.avatar-dropdown .signed-in {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--fg-dim);
}
.avatar-dropdown .btn {
  text-align: center;
}

/* --- Headings --- */

h2 { font-family: var(--sans); font-weight: 500; font-size: 1rem; margin-bottom: 0.75rem; color: var(--fg-headers); }
h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  margin: 2rem 0 0.5rem;
  color: var(--fg);
}
h3:first-child { margin-top: 0; }

.empty { color: var(--fg-dim); font-style: italic; padding: 0.5rem 0.75rem; }

/* --- Tables --- */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
th, td {
  text-align: left;
  padding: 0.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 1rem;
  padding-top: 0.25rem;
  color: var(--fg-dim);
  font-weight: 600;
  border-bottom: none;
}
.repo-list tbody tr:hover,
.log-list tbody tr:hover,
.ref-list tbody tr:hover,
.diffstat-list tbody tr:hover { background: var(--bg-alt); }
.repo-list td:first-child { font-weight: 600; }
.repo-list td,
.log-list td,
.ref-list td { border-bottom: none; }
.repo-list th:first-child,
.repo-list td:first-child,
.log-list th:first-child,
.log-list td:first-child,
.ref-list th:first-child,
.ref-list td:first-child { padding-left: 0.5rem; }
.repo-list th:last-child,
.repo-list td:last-child,
.log-list th:last-child,
.log-list td:last-child,
.ref-list th:last-child,
.ref-list td:last-child { padding-right: 0.5rem; }

.hash { font-family: var(--mono); white-space: nowrap; }
.date { white-space: nowrap; color: var(--fg-dim); }
.author { color: var(--fg-dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 0.25rem; }
.subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode { font-family: var(--mono); font-size: 1rem; color: var(--fg-dim); white-space: nowrap; }
.size { font-family: var(--mono); font-size: 0.875rem; color: var(--fg-dim); text-align: right; white-space: nowrap; }

.clone-url {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 1rem;
}
.clone-url label { font-family: var(--sans); font-weight: bold; margin-right: 0.5rem; }

/* --- Breadcrumb --- */

.breadcrumb {
  font-family: var(--mono);
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--fg-dim);
}

/* --- File view / blob --- */

.file-view {
  border: 1px solid var(--border);
  border-radius: 4px;
}
.file-view .blob-view { border: none; border-radius: 0; }
.file-header {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.file-header .file-name { font-weight: 600; flex: 1; }
.file-header .file-meta { color: var(--fg-dim); font-size: 0.875rem; }
.file-header .file-action {
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
  align-self: stretch;
  margin: -0.5rem 0;
  display: flex;
  align-items: center;
}
.file-view pre {
  margin: 0;
  padding: 1rem;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}

.blob-view {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: auto hidden;
}
.blob-code {
  margin: 0;
  border: none;
  border-collapse: collapse;
  border-spacing: 0;
}
.blob-code td { border: none; padding: 0; vertical-align: top; line-height: 0; }
.blob-code tr:first-child td { padding-top: 0.5rem; }
.blob-code tr:last-child td { padding-bottom: 0.75rem; }
.blob-code pre { margin: 0; font-family: var(--mono); font-size: 1rem; line-height: 1.45; white-space: pre; display: inline; }
.line-num {
  width: 1%;
  min-width: 4rem;
  padding: 0 0.5rem;
  text-align: right;
  user-select: none;
  vertical-align: top;
}
.line-num a {
  color: var(--fg-dim);
  opacity: 0.4;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.45;
  display: inline-block;
}
.line-num a:hover { opacity: 1; text-decoration: none; }
.line-code { width: 100%; padding-left: 0.75rem; }
tr:target .line-num { background: var(--bg-alt); }
tr:target .line-code { background: var(--bg-alt); }

/* --- Commit view --- */

.commit-info { margin-bottom: 1.5rem; }
.commit-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.commit-title .subject { font-family: var(--sans); font-weight: 600; font-size: 1.125rem; flex: 1; }
.commit-hash { font-family: var(--mono); font-size: 1rem; color: var(--fg-dim); white-space: nowrap; }
.commit-info .body { font-family: var(--mono); font-size: 1rem; margin: 0 0 1rem 0rem; white-space: pre-wrap; color: var(--fg); }
.commit-subtitle {
  display: flex;
  align-items: baseline;
  font-size: 1rem;
  color: var(--fg-dim);
  padding-top: 0.5rem;
}
.commit-meta { flex: 1; }
.commit-parents { white-space: nowrap; }
.commit-parents code { font-family: var(--mono); }

/* --- Diffstat --- */

.diffstat { margin-bottom: 1.5rem; }
.diffstat-summary {
  font-size: 1rem;
  color: var(--fg-dim);
  margin-bottom: 0.75rem;
}
.diffstat-list {
  font-size: 1rem;
  width: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.diffstat-list td { border: none; padding: 0.25rem 0.75rem; }
.diffstat-list td:first-child { padding-left: 0.75rem; padding-right: 0.5rem; width: 1%; }
.diffstat-list .name { font-family: var(--mono); }
.diffstat-list .stats {
  white-space: nowrap;
  font-family: var(--mono);
  text-align: right;
  width: 1%;
  padding-right: 0.75rem;
}
.diffstat-bar {
  display: inline-flex;
  gap: 1px;
  vertical-align: middle;
  margin-left: 0.5rem;
}
.diffstat-bar span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
}
.diff-header-stats { margin-left: auto; font-family: var(--mono); font-size: 1rem; white-space: nowrap; color: var(--fg-dim); }
.diffstat-bar .bar-add { background: var(--add-fg); }
.diffstat-bar .bar-del { background: var(--del-fg); }
.diffstat-bar .bar-neutral { background: #bbb; }

/* --- Status badges --- */

.status {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  border: 1px solid;
}
.status-A { color: var(--add-fg); border-color: var(--add-fg); }
.status-D { color: var(--del-fg); border-color: var(--del-fg); }
.status-M { color: #b08800; border-color: #b08800; }
.status-R { color: #6f42c1; border-color: #6f42c1; }

.add { color: var(--add-fg); }
.del { color: var(--del-fg); }

/* --- Diff files --- */

.diff-file {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.diff-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-headers);
}
.diff-header .status { font-weight: 600; font-size: 0.875rem; }
.diff-hunk {
  margin: 0;
  border: none;
  width: 100%;
}
.diff-hunk td { border: none; padding: 0; vertical-align: top; }
td.diff-num {
  width: 1%;
  min-width: 3rem;
  padding: 0 0.25rem 0 1rem;
  text-align: right;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--fg-dim);
  opacity: 0.5;
  user-select: none;
}
td.diff-marker {
  padding: 0 0.25rem 0 1rem;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.45;
  user-select: none;
}
.diff-add .diff-num,
.diff-add .diff-marker { color: var(--add-fg); opacity: 0.7; }
.diff-del .diff-num,
.diff-del .diff-marker { color: var(--del-fg); opacity: 0.7; }
.diff-context .diff-marker { color: transparent; }
.diff-hunk pre { margin: 0; font-family: var(--mono); font-size: 1rem; line-height: 1.45; white-space: pre; padding: 0 0.75rem; }
.diff-hunk tr:first-child td { padding-top: 0.5rem; }
.diff-hunk tr:last-child td { padding-bottom: 0.5rem; }
.diff-add td { background: var(--add-bg); }
.diff-del td { background: var(--del-bg); }
.diff-sep {
  margin: 0.25rem 0;
  border-top: 1px dashed var(--border);
}

/* --- Pagination --- */

.pagination {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0.25rem;
  font-size: 1rem;
}

.pagination a {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  text-decoration: none;
}

.pagination a + a {
  border-left: none;
}

.pagination a:first-child {
  border-radius: 4px 0 0 4px;
}

.pagination a:last-child {
  border-radius: 0 4px 4px 0;
}

.pagination a:only-child {
  border-radius: 4px;
}

.pagination a:hover {
  color: var(--fg);
}

/* --- Last commit bar --- */

.last-commit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  overflow: hidden;
}
.last-commit .date {
  margin-left: -0.5rem;
}

/* --- Repo home (tree + content) --- */

.repo-home {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}
/* --- Branch header --- */

.branch-header {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  margin-bottom: 0.25rem;
}
.branch-header .branch-selector summary {
  border-radius: 4px 0 0 4px;
  border-right: none;
}
.branch-header .last-commit {
  border-radius: 0 4px 4px 0;
}

/* --- View nav (Files / Log) --- */

.view-nav {
  margin: 0 0 1rem;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
}
.view-nav .last-commit {
  margin-left: auto;
  margin-right: 1rem;
  text-align: right;
}
.view-nav .branch-selector {
  margin-right: 1.5rem;
}

/* --- Branch selector --- */

.branch-selector {
  position: relative;
}
.branch-selector summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--mono);
  cursor: pointer;
  list-style: none;
}
.branch-selector summary:hover {
  background: var(--bg-alt);
}
.branch-selector summary::-webkit-details-marker { display: none; }
.branch-selector summary::after {
  content: "";
  flex-shrink: 0;
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--fg-dim);
}
.branch-selector[open] summary::after {
  border-top: none;
  border-bottom: 5px solid var(--fg-dim);
}
.branch-selector ul {
  position: absolute;
  z-index: 10;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 0.25rem;
  padding: 0.25rem 0;
  min-width: 100%;
  max-height: 300px;
  overflow-y: auto;
}
.branch-selector li a {
  display: block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--mono);
  text-decoration: none;
  white-space: nowrap;
}
.branch-selector li a:hover {
  background: var(--bg-alt);
  text-decoration: none;
}
.branch-selector li.active a {
  background: var(--bg-alt);
  font-weight: 600;
}

/* --- Clone selector --- */

.clone-selector {
  position: relative;
}
.clone-selector summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  list-style: none;
}
.clone-selector summary:hover {
  background: var(--bg-alt);
}
.clone-selector summary::-webkit-details-marker { display: none; }
.clone-selector summary::after {
  content: "";
  flex-shrink: 0;
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--fg-dim);
}
.clone-selector[open] summary::after {
  border-top: none;
  border-bottom: 5px solid var(--fg-dim);
}
.clone-dropdown {
  position: absolute;
  right: 0;
  z-index: 10;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem 1rem;
}
.clone-dropdown label {
  display: block;
  font-size: 0.875rem;
  color: var(--fg-dim);
  margin: 0 0 0.25rem;
}
.clone-dropdown label + input {
  margin-bottom: 1rem;
}
.clone-dropdown label + input:last-child {
  margin-bottom: 0;
}
.clone-dropdown input {
  font-family: var(--mono);
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--fg);
  width: 24rem;
  outline: none;
}
.clone-dropdown input:focus {
  border-color: var(--fg);
}

/* --- File tree --- */

.tree-entry {
  display: flex;
  align-items: baseline;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--link);
  text-decoration: none;
}
.tree-entry:hover { text-decoration: none; background: var(--bg-alt); }
.tree-entry.active { background: var(--bg-alt); }
.tree-entry.active .name { font-weight: 600; }
.file-tree .name { white-space: nowrap; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.file-tree .size { white-space: nowrap; margin-left: 0.5rem; }

.content-view { min-width: 0; }
.content-view h2 { font-size: 1rem; margin-bottom: 0.5rem; }

/* --- Error page --- */

.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-code {
  font-family: var(--mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg-dim);
  display: block;
  margin-bottom: 0.5rem;
}
.error-message {
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.error-path {
  display: block;
  color: var(--fg-dim);
  margin-bottom: 1.5rem;
}

/* --- Footer --- */

footer {
  margin-top: 1.5rem;
  padding: 0.75rem 0 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--fg-dim);
}

footer p {
  display: flex;
  justify-content: space-between;
}

/* --- Syntax highlighting (Radiance) --- */

.language-radiance .comment { color: var(--color-dimmer); font-style: italic; }
.language-radiance .builtin { color: var(--color-secondary); }
.language-radiance .op { color: var(--color-dim); }
.language-radiance .access,
.language-radiance .delim { color: var(--color-dim); }
.language-radiance .keyword { color: var(--color-dim); font-weight: 600; }
.language-radiance .type { color: var(--color-highlight-dim); font-weight: 600; }
.language-radiance .ref { color: var(--color-dim); }
.language-radiance .string { color: var(--color-secondary); }
.language-radiance .number { color: var(--color-highlight); }

/* --- Syntax highlighting (Radiance IL) --- */

.language-ril .comment { color: var(--color-dimmer); font-style: italic; }
.language-ril .keyword,
.language-ril .instr { color: var(--color-dim); font-weight: 600; }
.language-ril .type { color: var(--color-highlight-dim); font-weight: 600; }
.language-ril .delim { color: var(--color-dim); }
.language-ril .number { color: var(--color-highlight); }
.language-ril .string { color: var(--color-secondary); }
.language-ril .reg { color: var(--color-secondary); }
.language-ril .symbol { color: var(--color-highlight-dim); }
.language-ril .label { color: var(--color-highlight-dim); font-style: italic; }

/* --- Discussions --- */

.discussions-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.discussions-header h2 { margin-bottom: 0; }
.discussions-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.signed-in {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--fg-dim);
}

.btn {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--bg-alt); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
main .btn { font-size: 1rem; }

.discussion-list td { border-bottom: none; vertical-align: middle; }
.discussion-list tbody tr:hover { background: var(--bg-alt); }
.discussion-list th:first-child,
.discussion-list td:first-child { padding-left: 0.5rem; }
.discussion-list th:last-child,
.discussion-list td:last-child { padding-right: 0.5rem; text-align: right; }
.discussion-list .discussion-title a { color: var(--link); }
.discussion-list .avatar { width: 16px; height: 16px; margin-right: 0; }
.discussion-list .discussion-replies {
  white-space: nowrap;
  color: var(--fg-dim);
  text-align: left;
  width: 1%;
}

.discussion-comment {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 1rem;
}
.topic-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1rem 0;
}
.discussion-comment-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.75rem 0.5rem;
  font-size: 1rem;
  color: var(--fg);
}
.discussion-comment-date {
  font-size: 1rem;
  color: var(--fg-dim);
  white-space: nowrap;
  margin-left: 0.25rem;
}
.discussion-comment-author {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.discussion-comment-author a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}
.discussion-comment-author a:hover {
  text-decoration: underline;
}

.post-body {
  padding: 0.25rem 0.75rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}
.post-body p {
  margin: 0.5rem 0;
}
.post-body p:first-child {
  margin-top: 0;
}
.post-body p:last-child {
  margin-bottom: 0;
}
.post-body code {
  background: var(--bg-alt);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}
.post-body pre {
  background: var(--bg-alt);
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin: 0.5rem 0;
  overflow-x: auto;
}
.post-body pre code {
  padding: 0;
  background: none;
}

.discussion-form {
  margin-top: 1rem;
}
.discussion-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}
.discussion-form input[type="text"],
.discussion-form input[type="password"],
.discussion-form textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: var(--sans);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--fg);
  margin-bottom: 1rem;
  outline: none;
}
.discussion-form input:focus,
.discussion-form textarea:focus {
  border-color: var(--fg);
}
.discussion-form textarea {
  resize: vertical;
  min-height: 4rem;
}
.discussion-form input:user-invalid,
.discussion-form textarea:user-invalid {
  border-color: var(--del-fg);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.form-error {
  color: var(--del-fg);
  font-size: 0.875rem;
}

.sign-in-prompt {
  color: var(--fg-dim);
  font-size: 0.875rem;
  padding: 0.75rem 0 0;
  margin: 0;
}

.login-page {
  max-width: 24rem;
  margin: 1rem 0 1rem 2rem;
}

.bsky-logo {
  width: 1rem;
  height: 1rem;
  vertical-align: -0.125rem;
}

.login-hint {
  color: var(--fg-dim);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* --- Mobile --- */

@media (max-width: 720px) {
  .container {
    padding: 0 0.5rem 2rem;
  }


  .file-view pre,
  .blob-code pre,
  .blob-code .line-num a,
  .diff-hunk pre,
  td.diff-num,
  td.diff-marker { font-size: 0.875rem; }

  .repo-home {
    grid-template-columns: 1fr;
  }
  .repo-home .file-tree {
    display: none;
  }

  .view-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .view-nav .last-commit {
    margin-left: 0;
    width: 100%;
  }

  .repo-nav {
    flex-wrap: wrap;
  }

  .desktop {
    display: none;
  }

  .commit-title {
    flex-wrap: wrap;
  }

  .diff-header {
    flex-wrap: wrap;
  }

  .discussions-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

}
