* {
  box-sizing: border-box;
  word-break: break-word;
}

body {
  margin: 0;
}

body.lightbox-open {
  overflow: hidden;
}

textarea {
  width: 100%;
  box-sizing: border-box;
}

.screen {
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen__content {
  flex: 1;
  min-height: 0px;
  overflow: hidden;
}

.lightbox {
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox__content {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px;
}

.compose-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
  padding: 12px;
  transition: opacity 160ms ease;
  opacity: 0;
}

.compose-modal--animate {
  opacity: 1;
}

.compose-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.compose-modal__title {
  font-weight: 600;
}

.compose-modal__hint {
  margin-bottom: 8px;
}

.compose-reply-hint {
  margin-bottom: 8px;
}

.compose-modal__close {
  font-size: 0.9em;
}

.compose-trigger {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1001;
  margin: 0;
}

.compose-trigger__button {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.compose-trigger__icon {
  line-height: 1;
  display: block;
}

.message-confirm {
  gap: 12px;
}

.message-confirm__controls {
  justify-content: flex-end;
  gap: 8px;
}

.column {
  display: flex;
  flex-direction: column;
  min-height: 0px;
}

.row {
  display: flex;
  flex-direction: row;
  min-height: 0px;
  margin: 0;
  padding: 0;
}

.scroll-y {
  overflow-y: auto;
  min-height: 0px;
}

.scroll-x {
  overflow-x: auto;
  min-width: 0px;
}

.scroller {
  width: 100%;
}

.scroller__wrapper {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0 20px;
}

.message img {
  max-width: 100%;
}

.message-card {
  margin: 5px 0 0 0;
  padding: 12px;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.message--mini.message-card {
  padding: 8px 12px 8px 12px;
}

.message .title {
  margin-bottom: 6px;
}

.message_actions {
  margin-top: 8px;
}

.avatar {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.avatar .avatar_name {
  display: inline-block;
  line-height: 1.2;
}

.message-card .avatar img,
.message-card .avatar canvas,
.message-card .avatar svg {
  display: block;
}

.message-card .title.row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding-right: 12px;
}

.message-card .avatar {
  flex: 0 0 auto;
}

.message-card .message_meta.row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-left: auto;
  align-self: flex-start;
  margin-top: -4px;
  justify-content: flex-end;
  margin-right: -18px;
}

.message-card .message_content {
  margin-top: 6px;
  padding-left: 0;
}

.message-card .message_actions.row {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
  padding-left: 0;
}

.message--mini.message-card.row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0;
  flex-wrap: wrap;
  white-space: nowrap;
}

.message--mini.message-card .message_content {
  margin-top: 0;
  padding-left: 0;
  display: inline;
  margin-left: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message--mini.message-card .message_content > div,
.message--mini.message-card .message_content > span,
.message--mini.message-card .message_content *,
.message--mini.message-card .message_content.markdown,
.message--mini.message-card .message_content.markdown * {
  display: inline;
  margin: 0;
  padding: 0;
}

.message--mini.message-card .message_content br {
  display: none;
}

.message--mini.message-card .avatar {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
  white-space: nowrap;
}

.message--mini.message-card .message_meta.row {
  margin-left: auto;
  white-space: nowrap;
  margin-right: -4px;
  gap: 4px;
}

.message--mini.message-card .message_raw {
  flex: 1 0 100%;
  width: 100%;
  margin-top: 8px;
  white-space: normal;
}

.message-card .actions > * {
  margin-left: 0;
}

/* ── Action buttons (Reply / Repost / Quote / Like) ─────────────────────── */

.message-card .actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 0.82em;
  color: #536471;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
}

.action-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.action-btn .action-icon {
  font-size: 17px;
  line-height: 1;
}

.action-count {
  font-size: 0.82em;
  min-width: 1ch;
  line-height: 1;
}

.action-btn--reply:hover {
  color: #1d9bf0;
  background: rgba(29, 155, 240, 0.1);
}

.action-btn--repost:hover {
  color: #00ba7c;
  background: rgba(0, 186, 124, 0.1);
}

.action-btn--reposted {
  color: #00ba7c;
}

.action-btn--quote:hover {
  color: #1d9bf0;
  background: rgba(29, 155, 240, 0.1);
}

/* ── Reaction buttons (quick row) ───────────────────────────────────────── */

/* needs position:relative so the tray can be absolutely anchored */
.reaction-group,
.share-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.action-btn--react:hover {
  background: rgba(249, 24, 128, 0.1);
}

.action-btn--reacted {
  background: rgba(249, 24, 128, 0.08);
}

.action-btn--reacted:hover {
  background: rgba(249, 24, 128, 0.18);
}

.reaction-emoji {
  font-size: 15px;
  line-height: 1;
}

/* ── Reaction tray (Phase 5: floating pill, spring animation) ───────────── */

.reaction-tray,
.share-tray {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  z-index: 200;
  /* hidden by default — JS adds .reaction-tray--open */
  pointer-events: none;
  opacity: 0;
  transform: scale(0.82) translateY(6px);
  transform-origin: left bottom;
  transition: opacity 0.14s ease,
              transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-tray--open,
.share-tray--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Tray emoji buttons are slightly larger than the quick-row ones */
.reaction-tray .action-btn,
.share-tray .action-btn {
  padding: 4px 5px;
}

.reaction-tray .reaction-emoji {
  font-size: 18px;
}

/* ── Picker trigger button (··· at the end of the tray) ────────────────── */

.reaction-picker-trigger {
  margin-left: 2px;
  padding: 4px 7px;
  color: #8899a6;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-left: 1px solid #e1e8ed;
  border-radius: 0 999px 999px 0;
}

.reaction-picker-trigger:hover {
  color: #f91880;
  background: rgba(249, 24, 128, 0.1);
}

/* ── Full emoji picker panel (Phase 6) ──────────────────────────────────── */

.reaction-picker {
  position: absolute;
  /* bottom is set by JS to clear the tray; this is the fallback */
  bottom: calc(100% + 56px);
  left: 0;
  width: 272px;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14), 0 1px 4px rgba(0, 0, 0, 0.08);
  z-index: 201;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.90) translateY(8px);
  transform-origin: left bottom;
  transition: opacity 0.16s ease,
              transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-picker--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.reaction-picker__search {
  flex-shrink: 0;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid #e1e8ed;
  font-size: 0.85em;
  outline: none;
  background: #f7f9fa;
  border-radius: 12px 12px 0 0;
  box-sizing: border-box;
}

.reaction-picker__search:focus {
  background: #fff;
  border-bottom-color: #1d9bf0;
}

.reaction-picker__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px 6px;
}

/* Subtle scrollbar so the panel doesn't look clunky */
.reaction-picker__body::-webkit-scrollbar {
  width: 4px;
}
.reaction-picker__body::-webkit-scrollbar-thumb {
  background: #cfd9de;
  border-radius: 4px;
}

.reaction-picker__section {
  margin-bottom: 4px;
}

.reaction-picker__label {
  font-size: 0.68em;
  font-weight: 700;
  color: #8899a6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 8px 2px;
}

.reaction-picker__empty {
  padding: 20px 12px;
  font-size: 0.84em;
  color: #8899a6;
  text-align: center;
}

.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 2px 4px;
}

.emoji-btn {
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  padding: 3px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.08s, transform 0.08s;
}

.emoji-btn:hover {
  background: rgba(0, 0, 0, 0.07);
  transform: scale(1.22);
}

.emoji-btn--active {
  background: rgba(249, 24, 128, 0.1);
}

.emoji-btn--active:hover {
  background: rgba(249, 24, 128, 0.18);
}

/* ── Reaction chips (Phase 8: aggregated emoji chips on each post) ──────── */

.reaction-chips {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  /* push chips visually away from the timestamp link on the left */
  margin-left: 4px;
}

.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 1px 4px;
  border: 1px solid #e1e8ed;
  border-radius: 999px;
  background: #f7f9fa;
  cursor: pointer;
  font-size: 0.8em;
  color: #536471;
  line-height: 1;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.reaction-chip:hover {
  border-color: #f91880;
  background: rgba(249, 24, 128, 0.07);
  color: #f91880;
}

.reaction-chip--active {
  border-color: #f91880;
  background: rgba(249, 24, 128, 0.1);
  color: #f91880;
}

.reaction-chip--active:hover {
  background: rgba(249, 24, 128, 0.18);
}

.reaction-chip__emoji {
  font-size: 13px;
  line-height: 1;
}

.reaction-chip__count {
  font-size: 0.85em;
  font-weight: 600;
}

/* Legacy — kept for any cached renders still using this class */
.action-liked-meta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f91880;
  font-size: 0.82em;
}

.reaction-emoji-meta {
  font-size: 14px;
  line-height: 1;
}

/* ── Quoted post card ───────────────────────────────────────────────────── */

.quoted-post {
  border: 1px solid #c9dcec;
  border-radius: 16px;
  padding: 0;
  margin-top: 8px;
  font-size: 0.9em;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.12s, border-color 0.12s;
  background: linear-gradient(180deg, rgba(29, 155, 240, 0.05), rgba(29, 155, 240, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.quoted-post:hover {
  background: linear-gradient(180deg, rgba(29, 155, 240, 0.08), rgba(29, 155, 240, 0.025));
  border-color: #a7cfe7;
}

/* ── Repost card ────────────────────────────────────────────────────────── */

.repost-card {
  padding: 2px 0;
}

.repost-inner {
  border: 1px solid #cfd9de;
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  font-size: 0.9em;
  line-height: 1.4;
  transition: background 0.12s, border-color 0.12s;
  background: linear-gradient(180deg, #ffffff, #fafcfd);
  overflow: hidden;
}

.repost-inner:hover {
  background: linear-gradient(180deg, #ffffff, #f4f8fa);
  border-color: #c4d3da;
}

.embedded-post {
  padding: 10px 12px 12px;
}

.embedded-post-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.embedded-post-kicker-icon {
  font-size: 14px;
  line-height: 1;
}

.embedded-post-kicker-label {
  line-height: 1;
}

.embedded-post--quote .embedded-post-kicker {
  color: #1d5f8a;
  background: rgba(29, 155, 240, 0.1);
}

.embedded-post--repost .embedded-post-kicker {
  color: #58717d;
  background: rgba(83, 100, 113, 0.08);
}

.embedded-post-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.embedded-post-header .avatar {
  gap: 0;
}

.embedded-post-header .avatar img,
.embedded-post-header .avatar canvas,
.embedded-post-header .avatar svg {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.embedded-post-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.embedded-post-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
  font-size: 0.86em;
  width: 100%;
}

.embedded-post-author {
  font-weight: 600;
  color: #0f1419;
}

.embedded-post-timestamp {
  color: #536471;
  text-decoration: none;
}

.embedded-post-timestamp:hover {
  text-decoration: underline;
}

.embedded-post-message-meta.row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  margin-left: auto;
  flex: 0 0 auto;
}

.embedded-post-message-meta.row .timestamp {
  color: #536471;
  text-decoration: none;
}

.embedded-post-message-meta.row .timestamp:hover {
  text-decoration: underline;
}

.embedded-post-body {
  color: #0f1419;
  padding-left: 40px;
  overflow: hidden;
}

.embedded-post-body .markdown {
  margin: 0;
  color: #16202a;
}

.embedded-post-body .markdown p {
  line-height: 1.45;
}

.embedded-post-body p:first-child {
  margin-top: 0;
}

.embedded-post-body p:last-child {
  margin-bottom: 0;
}

.embedded-post-text {
  color: #0f1419;
}

.embedded-link-card {
  cursor: pointer;
}

.embedded-link-card:focus {
  outline: 2px solid #1d9bf0;
  outline-offset: 2px;
}

.embedded-link-card a {
  position: relative;
  z-index: 1;
}

.repost-unavailable {
  color: #888;
  font-size: 0.85em;
}

/* ── Quote compose hint ─────────────────────────────────────────────────── */

.compose-quote-hint {
  margin-bottom: 8px;
}

.compose-modal__quote-hint {
  margin-bottom: 8px;
}

.compose-quote-hint-inner {
  border-left: 3px solid #cfd9de;
  padding: 4px 8px;
  font-size: 0.85em;
  color: #536471;
}

.avatar--thumbnail {
  width: 36px;
  height: 36px;
  border-radius: 4px;
}

.avatar--large {
  width: 120px;
  height: 120px;
  border-radius: 6px;
}

.avatar--fullsize {
  width: 50%;
  height: auto;
  border-radius: 6px;
}

.status {
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 0px;
  border-radius: 100%;
  background: #08c;
}

.status-message {
  margin-left: 8px;
  color: #bd362f;
  font-size: 12px;
  line-height: 1.2;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error {
  background: #bd362f;
}

.navbar .menu {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.navbar {
  margin-bottom: 0;
}

.navbar .brand {
  padding-left: 0;
  margin-left: 0;
  padding-right: 10px;
}

.navbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px 0 0;
  flex-shrink: 0;
}

.navbar-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.navbar .container-fluid {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding-left: 0;
  padding-right: 0;
}

.navbar .nav.pull-left {
  float: none;
  display: flex;
  align-self: stretch;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar .nav.pull-left li {
  display: flex;
  align-self: stretch;
}

.navbar .nav.pull-left li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 100%;
  padding: 0 6px;
  line-height: 1;
}

.navbar .pull-right {
  float: none;
  margin-left: auto;
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.compose-trigger__icon.material-symbols-outlined {
  font-size: 21px;
}

.nav__icon {
  margin-right: 0;
  font-size: 1.2rem;
}

@media (max-width: 640px) {
  .navbar .container-fluid {
    flex-wrap: wrap;
  }

  .navbar .nav.pull-left {
    gap: 0;
  }

  .navbar .nav.pull-left li a {
    min-width: 32px;
    padding: 0 4px;
  }

  .nav__icon {
    font-size: 1.12rem;
  }
}

/* ── Git message styles ─────────────────────────────────────────────────── */

.git-sha {
  font-family: monospace;
  font-size: 0.82em;
  background: #e8e8e8;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  padding: 1px 4px;
  color: #555;
  user-select: all;
}

.git-branch-badge {
  display: inline-block;
  font-family: monospace;
  font-size: 0.82em;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 3px;
  padding: 1px 6px;
  color: #1e40af;
}

.git-branch-badge::before {
  content: '\238B\00a0';
}

.git-repo-name {
  margin: 0 0 8px 0;
  font-size: 1.1em;
  font-weight: 600;
}

.git-clone-url {
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.git-label {
  font-size: 0.82em;
  color: #666;
  white-space: nowrap;
}

.git-clone-input {
  font-family: monospace;
  font-size: 0.82em;
  background: #f0f0f0;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  padding: 2px 6px;
  user-select: all;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-refs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 8px 0;
}

.git-ref {
  display: flex;
  align-items: center;
  gap: 6px;
}

.git-ref-deleted {
  color: #bd362f;
  font-style: italic;
}

.git-commits {
  margin: 4px 0;
  border-left: 3px solid #d0d0d0;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.git-commit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.9em;
}

.git-commit-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.git-commit-title {
  flex: 1;
  color: #333;
}

.git-commit-byline {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
  font-size: 0.85em;
  color: #888;
}

.git-commit-author {
  color: #555;
}

.git-commit-stats {
  color: #888;
}

.git-stat-add {
  color: #22863a;
  font-weight: 600;
}

.git-stat-del {
  color: #cb2431;
  font-weight: 600;
}

.git-commit-body-preview {
  margin-left: 1.8em;
  color: #666;
  font-size: 0.88em;
  line-height: 1.4;
  white-space: pre-wrap;
  font-style: italic;
}

.git-commits-more {
  color: #888;
  font-style: italic;
}

.git-state-badge {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  background: #e8e8e8;
  border: 1px solid #d0d0d0;
  color: #555;
}

.git-state-open {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.git-state-closed {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.git-state-merged {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #e9d5ff;
}

/* ── Git browser (file explorer) ────────────────────────────────────────── */

.git-browser {
  max-width: 800px;
  padding: 12px 0;
}

.git-browser-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.git-browse-link {
  font-size: 0.85em;
  margin-left: auto;
}

.git-section-title {
  font-size: 0.95em;
  font-weight: 600;
  margin: 16px 0 6px 0;
  color: #333;
}

.git-breadcrumbs {
  font-size: 0.9em;
  margin-bottom: 10px;
  color: #555;
}

.git-bc-sep {
  color: #bbb;
}

.git-tree-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.git-tree-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.git-tree-table tr:last-child td {
  border-bottom: none;
}

.git-tree-icon {
  width: 1.2em;
  color: #888;
  text-align: center;
}

.git-tree-name a {
  color: #1e40af;
  text-decoration: none;
}

.git-tree-name a:hover {
  text-decoration: underline;
}

.git-blob-content {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.82em;
  overflow-x: auto;
  white-space: pre;
  tab-size: 4;
}

.git-readme {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin: 8px 0 12px 0;
  background: #fff;
}

.git-readme-content {
  line-height: 1.6;
}

.git-readme-content h1,
.git-readme-content h2,
.git-readme-content h3 {
  margin-top: 1em;
  margin-bottom: 0.4em;
}

.git-readme-content pre,
.git-readme-content code {
  font-family: monospace;
  font-size: 0.85em;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 1px 4px;
}

.git-readme-content pre {
  padding: 8px;
  overflow-x: auto;
}

.git-commit-meta {
  font-size: 0.82em;
  color: #666;
  margin: 4px 0 8px 0;
}

.git-commit-body {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px;
  font-size: 0.85em;
  white-space: pre-wrap;
  margin: 8px 0;
}

.git-commit-files {
  font-size: 0.85em;
  margin: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.git-commit-files-count {
  font-size: 0.8em;
  color: #888;
}

/* ── Review comments ────────────────────────────────────────────────────── */

.git-review-comments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0;
}

.git-review-comment {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.9em;
}

.git-review-comment-header {
  font-size: 0.82em;
  color: #666;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.git-review-comment-body {
  white-space: pre-wrap;
  line-height: 1.5;
}

.git-review-compose {
  margin: 8px 0;
}

.git-review-add-comment {
  font-size: 0.85em;
  color: #1e40af;
}

/* ── Repos discovery grid ───────────────────────────────────────────────── */

.repos-heading {
  font-size: 1.1em;
  font-weight: 600;
  margin: 16px 0 12px 0;
}

.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding-bottom: 20px;
}

.repos-empty {
  color: #888;
  font-size: 0.9em;
  padding: 20px 0;
}

.repos-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s;
}

.repos-card:hover {
  border-color: #1e40af;
}

.repos-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82em;
  color: #666;
}

.repos-card-name {
  margin: 0;
  font-size: 1em;
  font-weight: 600;
}

.repos-card-name a {
  color: #1e40af;
  text-decoration: none;
}

.repos-card-name a:hover {
  text-decoration: underline;
}

.repos-card-meta {
  font-size: 0.8em;
  color: #888;
}

.repos-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.repos-card-clone {
  font-size: 0.72em;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

/* ── Syntax highlighting ────────────────────────────────────────────────── */

.git-highlighted {
  background: #1e1e2e;
  color: #cdd6f4;
  border-color: #313244;
}

.git-highlighted .hl-keyword  { color: #cba6f7; font-weight: 600; }
.git-highlighted .hl-string   { color: #a6e3a1; }
.git-highlighted .hl-comment  { color: #6c7086; font-style: italic; }
.git-highlighted .hl-number   { color: #fab387; }
.git-highlighted .hl-punct    { color: #89dceb; }

/* ── Image viewer ───────────────────────────────────────────────────────── */

.git-image-view {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  min-height: 100px;
}

.git-blob-image {
  max-width: 100%;
  max-height: 60vh;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

/* ── Inline diff view ───────────────────────────────────────────────────── */

.git-diff {
  margin: 6px 0 16px 0;
}

.git-diff-stats {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.git-diff-stat-files {
  font-weight: 500;
}

.git-diff-stat-add {
  color: #1a7f37;
  font-weight: 600;
}

.git-diff-stat-del {
  color: #cf222e;
  font-weight: 600;
}

.git-diff-file {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  font-size: 0.85em;
}

.git-diff-file summary {
  list-style: none;
  cursor: pointer;
}

.git-diff-file summary::-webkit-details-marker {
  display: none;
}

.git-diff-file-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f6f8fa;
  padding: 6px 10px;
  border-bottom: 1px solid #e0e0e0;
  font-family: monospace;
}

.git-diff-status {
  font-weight: 700;
  width: 1.4em;
  text-align: center;
  flex-shrink: 0;
}

.git-diff-status-added    { color: #1a7f37; }
.git-diff-status-deleted  { color: #cf222e; }
.git-diff-status-modified { color: #9a6700; }
.git-diff-status-renamed  { color: #1e40af; }

.git-diff-path {
  font-size: 0.95em;
  word-break: break-all;
}

.git-diff-truncated {
  font-size: 0.8em;
  color: #888;
  font-style: italic;
}

.git-diff-binary,
.git-diff-empty {
  padding: 8px 12px;
  color: #888;
  font-style: italic;
  font-size: 0.85em;
}

.git-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82em;
  line-height: 1.5;
}

.git-diff-hunk-header td {
  background: #dbedff;
  color: #0550ae;
  padding: 2px 8px;
  font-style: italic;
  font-size: 0.85em;
}

.git-diff-line td {
  padding: 1px 4px;
  vertical-align: top;
  white-space: pre;
}

.git-diff-line-add { background: #e6ffec; }
.git-diff-line-del { background: #ffebe9; }
.git-diff-line-equal { background: #fff; }

.git-diff-line-add .git-diff-code  { color: #1a7f37; }
.git-diff-line-del .git-diff-code  { color: #82071e; }

.git-diff-ln {
  color: #8c959f;
  text-align: right;
  min-width: 2.5em;
  padding-right: 8px !important;
  user-select: none;
  border-right: 1px solid #e0e0e0;
}

.git-diff-prefix {
  color: #8c959f;
  padding: 0 4px !important;
  user-select: none;
  width: 1em;
}

.git-diff-line-add .git-diff-prefix { color: #1a7f37; }
.git-diff-line-del .git-diff-prefix { color: #cf222e; }

/* ── Code activity feed ─────────────────────────────────────────────────── */

.code-feed-title {
  margin: 12px 16px 8px 16px;
}

/* ── Profile card ───────────────────────────────────────────────────────── */

.profile-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 1px;
}

/* Banner */

.profile-banner {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, #cfe8f8 0%, #d8e8fc 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: default;
}

.profile-banner--editable {
  cursor: pointer;
}

.profile-banner--editable:hover .profile-banner-edit-overlay,
.profile-banner-edit-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 0.88em;
  font-weight: 500;
  pointer-events: none;
}

/* Body */

.profile-body {
  padding: 0 16px 16px 16px;
}

.profile-body-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* Avatar */

.profile-avatar-wrap {
  margin-top: -38px;
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-wrap img,
.profile-avatar-wrap canvas {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #fff;
  display: block;
  object-fit: cover;
}

.avatar--profile {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #fff;
  display: block;
  object-fit: cover;
}

.profile-avatar--editable {
  cursor: pointer;
}

.profile-avatar--editable::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

/* Actions (Edit / Follow) */

.profile-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}

.profile-edit-btn {
  border: 1px solid #cfd9de;
  background: #fff;
  color: #0f1419;
  font-weight: 700;
  font-size: 0.88em;
  border-radius: 20px;
  padding: 5px 16px;
  cursor: pointer;
  transition: background 0.12s;
}

.profile-edit-btn:hover {
  background: #f7f9f9;
}

/* Follow action from follow.js */

.profile-card-actions div,
.profile-card-actions a {
  font-size: 0.88em;
}

/* Name / handle / bio */

.profile-name {
  font-size: 1.12em;
  font-weight: 700;
  color: #0f1419;
  margin-bottom: 2px;
  line-height: 1.3;
}

.profile-handle {
  font-size: 0.82em;
  color: #536471;
  margin-bottom: 10px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  word-break: break-all;
}

.profile-bio {
  font-size: 0.92em;
  line-height: 1.55;
  color: #0f1419;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

/* Stats bar */

.profile-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 4px;
}

.profile-stat {
  font-size: 0.87em;
  color: #536471;
  cursor: pointer;
  user-select: none;
}

.profile-stat:hover {
  text-decoration: underline;
  color: #0f1419;
}

.profile-stat strong {
  color: #0f1419;
  font-weight: 700;
}

/* Expandable following/followers list */

.profile-list-expand {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eff3f4;
}

.profile-list-title {
  font-size: 0.82em;
  font-weight: 700;
  color: #536471;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.profile-list-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-list-grid a img,
.profile-list-grid a canvas {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: block;
  object-fit: cover;
}

/* Edit form */

.profile-edit-form {
  margin-bottom: 12px;
}

.profile-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.profile-edit-label {
  font-size: 0.8em;
  font-weight: 600;
  color: #536471;
  margin-top: 6px;
}

.profile-name-input,
.profile-bio-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfd9de;
  border-radius: 6px;
  font-size: 0.92em;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.profile-name-input:focus,
.profile-bio-input:focus {
  outline: none;
  border-color: #1d9bf0;
  box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.15);
}

.profile-edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Crop modals (avatar + banner) */

.profile-crop-modal {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.profile-crop-canvas-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0f1419;
  line-height: 0;
}

.profile-crop-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
}

/* circular crop indicator: darkens corners, spotlights the crop circle */
.profile-crop-canvas-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.profile-banner-crop-modal {
  max-width: 660px;
}

.profile-crop-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1em;
  font-weight: 700;
  color: #0f1419;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eff3f4;
}

.banner-crop-canvas {
  display: block;
  width: 100%;
  border-radius: 8px;
  background: #0f1419;
  /* touch-action prevents page scroll while panning on mobile */
  touch-action: none;
}

.profile-crop-hint {
  font-size: 0.78em;
  color: #536471;
  text-align: center;
  margin: 8px 0 0;
  letter-spacing: 0.01em;
}

.profile-crop-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid #eff3f4;
}

/* Petname */

.profile-petname {
  font-size: 0.85em;
  color: #536471;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.petname-label {
  color: #536471;
}

.petname-value {
  color: #0f1419;
  font-weight: 600;
}

.petname-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 3px;
  color: #536471;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  transition: background 0.1s;
}

.petname-edit-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.petname-input {
  display: none;
  padding: 3px 8px;
  border: 1px solid #cfd9de;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: inherit;
}

.petname-input:focus {
  outline: none;
  border-color: #1d9bf0;
}

.petname--editing .petname-input  { display: inline-block; }
.petname--editing .petname-value  { display: none; }
.petname--editing .petname-label  { display: none; }

/* Petname add-name prompt */

.petname-add-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #536471;
  font-size: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 4px;
  transition: color 0.12s;
}

.petname-add-btn:hover {
  color: #1d9bf0;
}

.petname--adding .petname-add-btn  { display: none; }
.petname--adding .petname-input    { display: inline-block; }

/* Copy-ID button inline with handle */

.profile-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1px 3px;
  color: #536471;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
  line-height: 1;
}

.profile-copy-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f1419;
}

/* Bio empty-state placeholder (own profile only) */

.profile-bio--self:empty::before {
  content: 'Add a bio…';
  color: #aab8c2;
  font-style: italic;
}

/* Follow button from follow.js */

.profile-card-actions br {
  display: none;
}

.profile-card-actions a {
  display: inline-block;
  border: 1px solid #cfd9de;
  background: #fff;
  color: #0f1419;
  font-weight: 700;
  font-size: 0.88em;
  border-radius: 20px;
  padding: 5px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}

.profile-card-actions a:hover {
  background: #f7f9f9;
}

.profile-card-actions label {
  font-size: 0.82em;
  color: #536471;
}

/* ── Git Forge UI Extensions ────────────────────────────────────────────── */

.git-forge-header {
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
  padding: 16px 32px 0 32px;
  margin-bottom: 16px;
}

.git-forge-repo-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25em;
  margin-bottom: 16px;
}

.git-forge-repo-title a {
  color: #0969da;
  text-decoration: none;
  font-weight: 600;
}

.git-forge-repo-title a:hover {
  text-decoration: underline;
}

.git-forge-repo-title .git-forge-sep {
  color: #57606a;
  font-weight: 400;
}

.git-forge-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: -1px;
}

.git-forge-tab {
  padding: 8px 16px;
  font-size: 0.88em;
  color: #1f2328;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.git-forge-tab:hover {
  background: #eaeef2;
}

.git-forge-tab.active {
  background: #fff;
  border-color: #d0d7de;
  border-bottom-color: #fff;
  font-weight: 600;
}

.git-forge-tab-icon {
  opacity: 0.7;
}

.git-forge-container {
  padding: 0 32px 32px 32px;
}

/* Sidebar layout for Code view */
.git-forge-main {
  display: flex;
  gap: 24px;
}

.git-forge-content {
  flex: 1;
  min-width: 0;
}

.git-forge-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.git-forge-card {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 16px;
  overflow: hidden;
}

.git-forge-card-header {
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.85em;
}

.git-forge-card-body {
  padding: 12px;
}

/* Enhanced tree table */
.git-tree-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d0d7de;
  border-radius: 6px;
}

.git-tree-table tr {
  border-bottom: 1px solid #d0d7de;
}

.git-tree-table tr:last-child {
  border-bottom: none;
}

.git-tree-table td {
  padding: 8px 12px;
}

.git-tree-table tr:hover {
  background-color: #f6f8fa;
}


/* ── Git Forge UI Extensions ────────────────────────────────────────────── */

.git-forge-header {
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
  padding: 16px 32px 0 32px;
  margin-bottom: 16px;
}

.git-forge-repo-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25em;
  margin-bottom: 16px;
}

.git-forge-repo-title a {
  color: #0969da;
  text-decoration: none;
  font-weight: 600;
}

.git-forge-repo-title a:hover {
  text-decoration: underline;
}

.git-forge-repo-title .git-forge-sep {
  color: #57606a;
  font-weight: 400;
}

.git-forge-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: -1px;
}

.git-forge-tab {
  padding: 8px 16px;
  font-size: 0.88em;
  color: #1f2328;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.git-forge-tab:hover {
  background: #eaeef2;
}

.git-forge-tab.active {
  background: #fff;
  border-color: #d0d7de;
  border-bottom-color: #fff;
  font-weight: 600;
}

.git-forge-container {
  padding: 0 32px 32px 32px;
}

.git-forge-repo-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.85em;
  color: #57606a;
}

.git-forge-repo-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}


/* ── Git Forge Issue/PR Lists ───────────────────────────────────────────── */

.git-forge-list {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  overflow: hidden;
}

.git-forge-list-header {
  background: #f6f8fa;
  padding: 12px 16px;
  border-bottom: 1px solid #d0d7de;
  display: flex;
  gap: 16px;
  font-weight: 600;
  font-size: 0.9em;
}

.git-forge-list-item {
  padding: 12px 16px;
  border-bottom: 1px solid #d0d7de;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.git-forge-list-item:last-child {
  border-bottom: none;
}

.git-forge-list-item:hover {
  background: #f6f8fa;
}

.git-forge-list-item-main {
  flex: 1;
  min-width: 0;
}

.git-forge-list-item-title {
  font-weight: 600;
  font-size: 1em;
  color: #1f2328;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}

.git-forge-list-item-title:hover {
  color: #0969da;
}

.git-forge-list-item-meta {
  font-size: 0.8em;
  color: #57606a;
}

.git-forge-list-empty {
  padding: 32px;
  text-align: center;
  color: #57606a;
}

.git-forge-list-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.git-forge-btn-primary {
  background-color: #1f883d;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.88em;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(27, 31, 36, 0.15);
  cursor: pointer;
  text-decoration: none;
}

.git-forge-btn-primary:hover {
  background-color: #1a7f37;
}

.git-state-badge {
  font-size: 0.75em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: capitalize;
}

.git-state-open { background: #dafbe1; color: #1a7f37; }
.git-state-closed { background: #fff8c5; color: #9a6700; }
.git-state-merged { background: #f5f0ff; color: #8250df; }


/* ── Git Forge Inline Reviews ──────────────────────────────────────────── */

.git-diff-inline-comment-row td {
  padding: 0 !important;
  background: #fff;
}

.git-diff-inline-comment {
  margin: 8px 16px 8px 48px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.git-diff-inline-comment-header {
  padding: 4px 12px;
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
  font-size: 0.8em;
  color: #57606a;
}

.git-diff-inline-comment-body {
  padding: 8px 12px;
  font-size: 0.9em;
}

.git-diff-ln:hover::after {
  content: " +";
  color: #0969da;
  cursor: pointer;
}

.git-diff-add-comment-btn {
  opacity: 0;
  cursor: pointer;
  color: #0969da;
  font-weight: bold;
  padding: 0 4px;
}

tr:hover .git-diff-add-comment-btn {
  opacity: 1;
}

.git-diff-inline-compose {
  margin: 8px 16px 8px 48px;
  padding: 8px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
}


/* ── Git Forge Sidebar & Explorer ───────────────────────────────────────── */

.git-forge-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.git-forge-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
}

.git-sidebar-header {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.85em;
  border-bottom: 1px solid #d0d7de;
  background: #f6f8fa;
}

.git-sidebar-tree {
  padding: 4px 0;
}

.git-sidebar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.85em;
  color: #1f2328;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.git-sidebar-item:hover {
  background-color: #eaeef2;
  color: #0969da;
}

.git-sidebar-item.active {
  background-color: #fff;
  font-weight: 600;
  border-left: 2px solid #0969da;
}

.git-sidebar-icon {
  width: 14px;
  text-align: center;
  opacity: 0.6;
}

/* Metadata in tree table */
.git-tree-meta {
  color: #57606a;
  font-size: 0.85em;
  white-space: nowrap;
}

.git-tree-table td {
  border-bottom: 1px solid #d0d7de;
}

.git-tree-table tr:last-child td {
  border-bottom: none;
}


/* ── Git Forge Mesh & Activity ─────────────────────────────────────────── */

.git-forge-activity-item {
  border-left: 2px solid #d0d7de;
  margin-left: 20px;
  padding-left: 24px;
  padding-bottom: 20px;
  position: relative;
}

.git-forge-activity-item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d0d7de;
}

.git-forge-activity-item.push::before { border-color: #1f883d; background: #dafbe1; }
.git-forge-activity-item.comment::before { border-color: #0969da; background: #ddf4ff; }
.git-forge-activity-item.issue::before { border-color: #9a6700; background: #fff8c5; }

.git-mesh-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  color: #57606a;
}

.git-mesh-status.local {
  background: #dafbe1;
  border-color: #1a7f37;
  color: #1a7f37;
}

.git-mesh-status.remote {
  background: #fff8c5;
  border-color: #9a6700;
  color: #9a6700;
}

.git-network-forks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.git-fork-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  font-size: 0.88em;
}


/* ── Git Forge Final Polish ────────────────────────────────────────────── */

.git-forge-layout {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-radius: 8px;
  background: #fff;
  min-height: 80vh;
}

.git-forge-repo-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
}

.git-forge-tab {
  transition: all 0.2s ease;
  font-weight: 500;
}

.git-sidebar-item {
  transition: background-color 0.1s ease;
}

.git-sidebar-icon {
  font-size: 1.1em;
}

.git-tree-table tr {
  transition: background-color 0.1s ease;
}

.git-tree-name a {
  color: #0969da;
  font-weight: 500;
  text-decoration: none;
}

.git-tree-name a:hover {
  text-decoration: underline;
}

.git-sha {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  background: #eff1f3;
  padding: 2px 4px;
  border-radius: 4px;
  color: #1f2328;
}

.git-forge-activity-item {
  font-size: 0.95em;
  line-height: 1.6;
}

/* Make the clone input look more like a terminal command */
.git-clone-input {
  display: inline-block;
  padding: 4px 8px;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 0.85em;
  color: #57606a;
}


/* ── PrismJS Light Theme (GitHub-ish) ─────────────────────────────────── */

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: #6a737d;
}

.token.punctuation {
	color: #24292e;
}

.token.namespace {
	opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
	color: #005cc5;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: #032f62;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
	color: #d73a49;
}

.token.atrule,
.token.attr-value,
.token.keyword {
	color: #d73a49;
}

.token.function,
.token.class-name {
	color: #6f42c1;
}

.token.regex,
.token.important,
.token.variable {
	color: #e36209;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}


/* ── Navbar Search ─────────────────────────────────────────────────────── */

.nav-search {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 4px 10px;
  margin: 0 8px 0 0;
  background: #f6f8fa;
  font-size: 0.85em;
  width: 160px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search:focus {
  background: #fff;
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

@media (max-width: 640px) {
  .nav-search {
    width: 110px;
    font-size: 0.8em;
  }
}

