/* git.ge: dense, text-first, fast. No framework. */

/* Noto Sans Georgian (SIL OFL, see fonts/OFL.txt), Georgian subset only: the
   browser fetches it only for Mkhedruli/Mtavruli text. Latin uses the system font. */
@font-face {
  font-family: "Noto Sans Georgian";
  src: url("/assets/fonts/noto-sans-georgian.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
}

:root {
  --bg: #fdfdfc;
  --fg: #1b1b1a;
  --muted: #62625f;
  --line: #e4e3df;
  --soft: #f3f2ef;
  --accent: #b3261e;
  --link: #1f4fbf;
  --up: #1d7a3a;
  --down: #9a3b1c;
  --badge: #efeae0;
  --font: "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --fg: #e8e7e3;
    --muted: #a09f9a;
    --line: #2d2c2a;
    --soft: #1d1c1b;
    --accent: #f07167;
    --link: #8ab4ff;
    --up: #6fcf8b;
    --down: #f0a07a;
    --badge: #2a2824;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--font);
  /* Georgian words are long; never let them push the layout sideways. */
  overflow-wrap: break-word;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 .3em; }
h1 { font-size: 1.6rem; margin-top: 1.2em; }
h2 { font-size: 1.15rem; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; background: var(--bg); padding: .3rem .6rem; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--soft); }
.bar { display: flex; align-items: center; gap: 1.25rem; padding-top: .6rem; padding-bottom: .4rem; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.25rem; color: var(--fg); letter-spacing: -.01em; }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: var(--fg); }
.nav a[aria-current] { color: var(--accent); font-weight: 600; }
.lang {
  margin-left: auto; font: inherit; font-size: .85rem; color: var(--fg); background: none;
  border: 1px solid var(--line); border-radius: 4px; padding: .15rem .6rem; cursor: pointer;
}
/* Category bar: its own strip, a label, and chips with counts, so it doesn't read
   as a second row of the main menu. */
.cats-bar { border-top: 1px solid var(--line); background: var(--bg); }
.cats { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .4rem; font-size: .85rem; padding-top: .45rem; padding-bottom: .45rem; }
.cats-label { color: var(--muted); margin-right: .3rem; }
.cats a {
  color: var(--fg); background: var(--soft); border: 1px solid var(--line);
  border-radius: 999px; padding: .08rem .6rem; white-space: nowrap;
}
.cats a:hover { border-color: var(--muted); text-decoration: none; }
.cats a[aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cats .n { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.cats a[aria-current] .n { color: inherit; opacity: .7; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1rem 0 2rem; color: var(--muted); font-size: .85rem; }
.site-footer p { margin: .2rem 0; }

/* Text */
.intro h1 { margin-bottom: .1em; }
.stats, .note, .lead { color: var(--muted); }
.note { font-size: .88rem; margin: 0 0 .5rem; }
.lead { max-width: 66rem; }
.notice { background: var(--soft); border-left: 3px solid var(--accent); padding: .5rem .8rem; font-size: .92rem; }
.more { margin: .6rem 0 0; }

/* Layout */
.cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 2.5rem; }
@media (max-width: 52rem) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* Project rows */
.plist { list-style: none; margin: 0; padding: 0; }
.p { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.p-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; }
.p-title { overflow-wrap: anywhere; }
.p-name { font-weight: 600; overflow-wrap: anywhere; }
.p-owner { font-weight: 400; color: var(--muted); }
a.p-owner:hover { color: var(--link); }
.p-desc { margin: .1rem 0 .15rem; font-size: .93rem; }
.p-meta { display: flex; flex-wrap: wrap; gap: .1rem .9rem; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-lang::before { content: ""; display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: var(--muted); margin-right: .35em; vertical-align: .08em; }
.p-trend.up { color: var(--up); font-weight: 600; }
.p-trend.down { color: var(--down); }

.badge { font-size: .72rem; background: var(--badge); color: var(--fg); border-radius: 3px; padding: .05rem .4rem; white-space: nowrap; }
.badge.hw { color: var(--up); }
.badge.ok { color: var(--link); }
.badge.cat { color: var(--muted); }
/* No push in 12+ months: the date steps back and a quiet outlined marker follows it. */
.p-pushed.dim { opacity: .8; }
.badge.dormant { color: var(--muted); background: none; border: 1px solid var(--line); padding: 0 .35rem; }

/* Avatars (self-hosted; see gitge.cs avatars). Sizes are classes: the CSP forbids inline styles. */
.avatar { display: inline-block; flex: none; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); object-fit: cover; vertical-align: middle; }
.avatar-24 { width: 24px; height: 24px; font-size: .7rem; }
.avatar-36 { width: 36px; height: 36px; font-size: .95rem; }
.avatar-96 { width: 96px; height: 96px; font-size: 2.4rem; }
.avatar-initial { display: inline-grid; place-items: center; color: var(--muted); font-weight: 600; }

/* Developer page */
.dev-head { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 1.4rem; }
.dev-id { min-width: 0; }
.dev-id h1 { margin: 0 0 .15rem; }
.dev-login, .dev-summary { margin: .1rem 0; color: var(--muted); font-size: .92rem; }
.dev-login a { color: var(--muted); }
.chips { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font-size: .8rem; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: .08rem .6rem; }
.chip a { color: var(--fg); }
/* Aligned with the header's text column on wide screens (avatar 96px + gap). */
.dev-ranks { margin: .6rem 0 0 calc(96px + 1.25rem); }
@media (max-width: 36rem) { .dev-ranks { margin-left: 0; } }
.dev-ranks h2 { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 .15rem; }
.dev-ranks ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.dev-ranks li { padding: .08rem 0; overflow-wrap: anywhere; }
.dev-social { display: flex; flex-wrap: wrap; gap: .6rem 2.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1.2rem 0 .4rem; padding: .6rem 0 .5rem; }
.dev-social-title { flex-basis: 100%; margin: 0; font-size: .88rem; font-weight: 600; }
.people-text { margin: 0 0 .35rem; font-size: .85rem; color: var(--muted); }
.people-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.people-more { font-size: .82rem; color: var(--muted); margin-left: .3rem; }
.dev-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.4fr); gap: 0 2.5rem; }
.dev-cols > :only-child { grid-column: 1 / -1; }
@media (max-width: 52rem) { .dev-cols { grid-template-columns: minmax(0, 1fr); } }
.dev-smaller { margin-top: .8rem; }
.dev-smaller summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
.dev-side h2 { font-size: 1rem; }
/* Side-column rows (contributes to, contributors, help wanted): one markup, one layout.
   Avatar, main text and note sit in a single centered flex row with the same gap. */
.rows { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.row { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line); line-height: 1.35; }
.row-avatar { display: flex; flex: none; }
.row-main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.row-note { flex: none; color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* Developer directory (/u/): cells stretch to the row's height, so bottom borders align. */
.dev-grid { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 1.2rem; align-items: stretch; }
.dev-cell { display: flex; min-width: 0; }
.dev-card { display: flex; flex: 1; gap: .6rem; align-items: center; min-width: 0; padding: .45rem 0; border-bottom: 1px solid var(--line); color: var(--fg); }
.dev-card:hover { text-decoration: none; }
.dev-card:hover strong { color: var(--link); }
.dev-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dev-card-text strong { overflow-wrap: anywhere; }
.dev-card-login, .dev-card-meta { font-size: .78rem; color: var(--muted); }
.dev-card-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-group { margin-top: 2rem; }
/* Filter sidebar (FilterSidebar: /developers/ and /help-wanted/): a toolbar across the top (the panel-left toggle, the
   filter tags while the column is hidden, the sort links, the result), then the
   category and language lists in a narrow left column (sticky, scrolls on its own)
   beside the grid. The toolbar spans both columns, so the toggle never moves.
   html.devs-collapsed (app.js, remembered) hides the column on desktop. Below 56rem
   the column becomes a panel under the toolbar. Without JavaScript .ready is never
   set: no toggle, no column, just the grid. */
.devs-layout { margin: .8rem 0 0; }
.devs-layout.ready { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 0 1.75rem; align-items: start; }
.devs-topbar {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem;
  margin: 0 0 .5rem; font-size: .85rem;
}
.devs-side { position: sticky; top: .8rem; max-height: calc(100vh - 1.6rem); overflow-y: auto; scrollbar-width: thin; padding: .1rem .4rem .6rem 0; font-size: .88rem; }
.devs-main { min-width: 0; }
.devs-panel-head, .devs-panel-done { display: none; }

/* The toggle: a button with a panel-left icon (left pane filled while the lists are
   shown), the word "ფილტრები" and a count badge while filters are active. */
.devs-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-width: 2rem; min-height: 2rem; padding: .2rem .65rem .2rem .45rem;
  font: inherit; font-size: .9rem; color: var(--fg); background: var(--soft);
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.devs-toggle:hover { border-color: var(--muted); }
.devs-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.devs-toggle[hidden], .devs-toggle-badge[hidden] { display: none; }
.devs-toggle-icon { flex: none; display: block; }
.devs-toggle-pane { fill: currentColor; opacity: 0; }
.devs-toggle[aria-expanded="true"] .devs-toggle-pane { opacity: .45; }
.devs-toggle-badge {
  display: inline-block; min-width: 1.15rem; padding: 0 .3rem; border-radius: 999px;
  background: var(--fg); color: var(--bg); font-size: .72rem; font-weight: 600;
  line-height: 1.15rem; text-align: center; font-variant-numeric: tabular-nums;
}
.devs-tags { display: contents; }
.devs-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  font: inherit; font-size: .8rem; color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: .08rem .5rem .08rem .55rem; cursor: pointer;
}
/* A small "×" icon (tags, the phone panel's close button): two strokes in currentColor. */
.icon-x { flex: none; width: .7rem; height: .7rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.devs-tag .icon-x { color: var(--muted); }
.devs-tag:hover .icon-x { color: var(--fg); }
.devs-tag:hover { border-color: var(--muted); }

.devs-facet + .devs-facet { margin-top: 1.1rem; }
.devs-facet-title { font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin: 0 0 .25rem; }
.devs-facet-list { list-style: none; padding: 0; margin: 0; }
.devs-facet-list li[hidden] { display: none; }
.devs-facet-item {
  display: flex; align-items: baseline; gap: .5rem; width: 100%; text-align: left;
  font: inherit; color: var(--fg); background: none; border: 0; border-radius: 4px; padding: .12rem .3rem; cursor: pointer;
}
/* The radio-like marker: a ring, filled when active. */
.devs-facet-item::before {
  content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%;
  border: 1.5px solid var(--muted); transform: translateY(.02rem);
}
.devs-facet-item[aria-pressed="true"]::before { background: var(--fg); border-color: var(--fg); }
.devs-facet-item[aria-pressed="true"] { font-weight: 600; }
.devs-facet-item:hover { background: var(--soft); }
.devs-facet-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.devs-facet-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.devs-facet-item .n { color: var(--muted); font-size: .8rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.devs-facet-item[aria-disabled="true"] { opacity: .4; cursor: default; }
.devs-facet-item[aria-disabled="true"]:hover { background: none; }
.devs-facet-more { margin: .2rem 0 0 .3rem; font-size: .85rem; }

/* Sort links wrap between entries (never clipped); the result goes right, or to the
   next line when there is no room. */
.devs-topbar .sort { margin: 0; gap: .15rem .35rem; flex: 0 1 auto; min-width: 0; }
.sort.devs-sort button { font: inherit; color: var(--link); background: none; border: 0; border-radius: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.sort.devs-sort button:hover { text-decoration: underline; }
.sort.devs-sort button[aria-pressed="true"] { background: none; color: var(--fg); border: 0; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.devs-sort-sep { color: var(--muted); }
.devs-topbar .dev-filter-status { margin-left: auto; display: inline-flex; align-items: baseline; color: var(--muted); gap: .35rem; white-space: nowrap; }
.devs-topbar .dev-filter-status .linklike { margin-left: 0; }
.devs-topbar .dev-filter-status:has(.dev-filter-clear:not([hidden])) .dev-filter-count::after { content: " ·"; }
/* Inline toolbar (pages without sort links): the result follows the button on the
   left instead of going right. */
.devs-inline .devs-topbar .dev-filter-status { margin-left: 0; white-space: normal; }
.devs-main .dev-filter-empty { margin: .3rem 0 .8rem; }
.devs-main .dev-grid { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }

@media (min-width: 56.0625rem) {
  html.devs-collapsed .devs-layout.ready { grid-template-columns: minmax(0, 1fr); }
  html.devs-collapsed .devs-side { display: none; }
  html.devs-collapsed .devs-main .dev-grid { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
  /* With the column shown it carries the state: no tags. */
  html:not(.devs-collapsed) .devs-tags { display: none; }
}
@media (max-width: 56rem) {
  .devs-layout.ready { display: block; }
  .devs-toggle[aria-expanded="true"] { border-color: var(--fg); }
  .devs-topbar .dev-filter-status { margin-left: 0; }
  /* The panel: closed until the button opens it, then in the flow under the toolbar. */
  .devs-layout:not(.open) .devs-side { display: none; }
  .devs-side { position: static; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem .8rem; margin: 0 0 .9rem; background: var(--bg); }
  .devs-panel-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 .5rem; }
  .devs-panel-close { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; color: var(--fg); background: none; border: 0; border-radius: 6px; padding: 0; cursor: pointer; }
  .devs-panel-close:hover { background: var(--soft); }
  .devs-panel-close .icon-x { width: .9rem; height: .9rem; }
  .devs-panel-done { display: block; width: 100%; margin: 1rem 0 0; font: inherit; color: var(--bg); background: var(--fg); border: 0; border-radius: 6px; padding: .45rem; cursor: pointer; }
  .devs-facet-item { padding: .3rem .3rem; }
}
.linklike { font: inherit; color: var(--link); background: none; border: 0; padding: 0; margin-left: .6rem; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
/* Elements above set a display value, which would otherwise override [hidden]. */
.dev-cell[hidden], .dev-group[hidden], .sort[hidden], .devs-side[hidden], .hw-project[hidden] { display: none; }
/* Which meta line a card shows follows the active sort (app.js sets data-metric). */
.m-metric { display: none; }
.dev-dir[data-metric="followed"] .m-default, .dev-dir[data-metric="pushed"] .m-default, .dev-dir[data-metric="first"] .m-default { display: none; }
.dev-dir[data-metric="followed"] .m-metric, .dev-dir[data-metric="pushed"] .m-metric, .dev-dir[data-metric="first"] .m-metric { display: block; }

/* Category overview */
.catgrid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem 1.5rem; }
.catgrid li { border-top: 2px solid var(--line); padding-top: .4rem; }
.catgrid a { color: var(--fg); }
.catgrid .count { color: var(--muted); font-size: .85rem; margin-left: .3rem; }
.catgrid p { margin: .15rem 0 0; font-size: .82rem; color: var(--muted); }

/* Sort and search (revealed by app.js) */
.sort { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); margin: .4rem 0; }
.sort button {
  font: inherit; color: var(--fg); background: none; border: 1px solid var(--line);
  border-radius: 3px; padding: .1rem .55rem; cursor: pointer;
}
.sort button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.search input {
  width: 100%; max-width: 36rem; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; padding: .45rem .65rem; margin: .3rem 0;
}
.pager { display: flex; gap: 1.2rem; align-items: center; margin: 1.2rem 0; font-size: .92rem; }
.pager span { color: var(--muted); }

/* Help wanted */
.hw-project h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; font-size: 1rem; }
.hw-project h2 .p-meta { font-weight: 400; }
.issues { margin: 0; padding-left: 1.1rem; }
.issues li { margin: .25rem 0; }
.issue-meta { display: inline-flex; flex-wrap: wrap; gap: .1rem .5rem; margin-left: .3rem; font-size: .78rem; color: var(--muted); }
.label { background: var(--badge); border-radius: 3px; padding: 0 .35rem; color: var(--fg); }
/* Someone is already assigned: a quiet outlined note, not a label. */
.issue-assigned { border: 1px solid var(--line); border-radius: 3px; padding: 0 .35rem; }
/* "How is this ordered?": one quiet line under the lead, as wide as the lead. */
.hw-ranking { max-width: 66rem; margin: -.4rem 0 .4rem; color: var(--muted); font-size: .85rem; }
.hw-ranking summary { cursor: pointer; width: fit-content; }
.hw-ranking p { margin: .3rem 0 0; }
/* The filter toolbar shows the (live) count, so the static one is for no-JS only. */
.devs-layout.ready .hw-total { display: none; }
.devs-main .hw-project:first-child h2 { margin-top: .2rem; }

/* Roundups and long text */
.roundups { list-style: none; padding: 0; }
.roundups li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.roundups time { color: var(--muted); font-size: .85rem; margin-right: .6rem; font-variant-numeric: tabular-nums; }
.roundups p { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; }
.prose { max-width: 54rem; }
.prose h2 { margin-top: 1.8em; }
.prose li { margin: .2rem 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--soft); padding: .05rem .3rem; border-radius: 3px; }

/* The about page carries both languages; show the one matching <html lang>. */
html[lang="ka"] .l10n[lang="en"], html[lang="en"] .l10n[lang="ka"] { display: none; }

@media (max-width: 36rem) {
  body { font-size: 15px; }
  /* One swipeable row of categories instead of four wrapped lines. */
  .cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cats::-webkit-scrollbar { display: none; }
  .cats-label { flex: none; }
  /* Filter chips: one swipeable row each, like the category bar. */
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  h1 { font-size: 1.35rem; }
  .bar { gap: .4rem 1rem; }
  .dev-head { gap: .8rem; }
  .dev-head .avatar-96 { width: 64px; height: 64px; font-size: 1.6rem; }
}

/* Home Spotlight: the short heading and its note share one line (the note wraps under it on phones). */
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .75rem; row-gap: .1rem; margin: 1.6em 0 .35rem; }
.sec-head h2 { margin: 0; }
.sec-head .note { margin: 0; }
