/* git.nitaimaarek.com — layout only. Colours, type, controls and every
   component come from framework.nitaimaarek.com/ui.css through --ui-* tokens. */

body { padding: 0; display: flex; flex-direction: column; min-height: 100vh; }
body > * { max-width: none; margin-inline: 0; }
.gh-ic { display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.gh-slash { color: var(--ui-faint); margin-inline: .3rem; }
.gh-inline { display: inline; margin: 0; }
.gh-pad { padding: var(--ui-3) var(--ui-4); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------- top bar */
.gh-top {
  display: flex; align-items: center; gap: var(--ui-3);
  padding: var(--ui-3) var(--ui-5);
  background: var(--ui-bg-alt);
  border-bottom: var(--ui-border) solid var(--ui-line-soft);
  position: sticky; top: 0; z-index: 50;
}
.gh-logo { display: flex; align-items: center; gap: .5rem; color: var(--ui-text); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; }
.gh-logo img { border-radius: 8px; width: 32px; height: 32px; }
.gh-search { margin: 0; width: min(300px, 32vw); }
.gh-search input { padding-block: .3rem; font-size: .88rem; }
.gh-nav a { color: var(--ui-text); font-weight: 600; font-size: .92rem; text-decoration: none; }
.gh-nav a:hover { color: var(--ui-muted); }
.gh-avbtn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.gh-top .ui-menu form { margin: 0; }
.gh-top .ui-menu-label strong { color: var(--ui-text); }

.gh-av { width: 32px; height: 32px; font-size: .85rem; font-weight: 700; flex: none; display: inline-grid; place-items: center; }
.gh-av--xs { width: 20px; height: 20px; font-size: .62rem; vertical-align: middle; }
.gh-av--md { width: 40px; height: 40px; font-size: 1rem; }
.gh-av--xl { width: min(260px, 60vw); height: auto; aspect-ratio: 1; font-size: 6rem; }

/* ------------------------------------------------------------- page */
.gh-main { flex: 1; width: 100%; max-width: var(--ui-width); margin-inline: auto; padding: var(--ui-5) var(--ui-5) var(--ui-8); box-sizing: border-box; }
.gh-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-4); justify-content: center; padding: var(--ui-5); color: var(--ui-muted); font-size: .85rem; border-top: var(--ui-border) solid var(--ui-line-soft); }
.gh-foot a { color: var(--ui-muted); }
.gh-narrow { max-width: 760px; margin-inline: auto; }
.gh-page-title { font-size: 1.6rem; margin-top: 0; }
.gh-h { font-size: 1rem; font-weight: 650; letter-spacing: -.01em; margin: var(--ui-5) 0 var(--ui-3); }
.gh-h--rule { padding-bottom: var(--ui-2); border-bottom: var(--ui-border) solid var(--ui-line-soft); margin-top: 0; font-size: 1.35rem; }
.gh-blank { padding: var(--ui-6) var(--ui-4); text-align: center; color: var(--ui-muted); border: var(--ui-border) dashed var(--ui-line); border-radius: var(--ui-radius); list-style: none; }
.gh-empty-page { text-align: center; padding-block: var(--ui-8); }
.gh-empty-page p { margin-inline: auto; }

.gh-box { border: var(--ui-border) solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-bg-alt); margin-block: 0 var(--ui-4); overflow: hidden; }
.gh-box__head { display: flex; align-items: center; gap: var(--ui-2); flex-wrap: wrap; padding: var(--ui-2) var(--ui-4); background: var(--ui-surface); border-bottom: var(--ui-border) solid var(--ui-line); font-size: .9rem; min-height: 2.9rem; box-sizing: border-box; }
.gh-box__head a { color: var(--ui-text); font-weight: 600; }
.gh-iconbtn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--ui-radius-sm); color: var(--ui-muted); background: none; border: 0; cursor: pointer; padding: 0; }
.gh-iconbtn:hover { background: var(--ui-surface-2); color: var(--ui-text); }
.gh-iconbtn--danger:hover { color: var(--ui-bad); }

/* ---------------------------------------------------------- home & hero */
.gh-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--ui-6); align-items: center; padding-block: var(--ui-6) var(--ui-7); }
.gh-hero .ui-display { font-size: clamp(3rem, 1rem + 7vw, 6.5rem); }
.gh-hero__form { display: flex; gap: var(--ui-2); flex-wrap: wrap; }
.gh-hero__form input { flex: 1; min-width: 12rem; width: auto; }
.gh-hero__term { font-size: .85rem; color: var(--ui-text); margin: 0; }
.gh-dash { display: grid; grid-template-columns: 300px 1fr; gap: var(--ui-6); }
.gh-dash__side .gh-h { margin: 0; }
.gh-side-repos { list-style: none; padding: 0; margin-top: var(--ui-3); }
.gh-side-repos li { margin-block: var(--ui-2); font-size: .9rem; display: flex; align-items: center; gap: .3rem; }
.gh-side-repos a { color: var(--ui-text); font-weight: 600; text-decoration: none; display: inline-flex; gap: .45rem; align-items: center; }
.gh-side-repos a:hover { text-decoration: underline; }
.gh-quick__form { display: flex; gap: var(--ui-2); align-items: center; flex-wrap: wrap; margin: 0; }
.gh-quick__form input { flex: 1; width: auto; min-width: 10rem; }
.gh-quick__owner { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; }

.gh-repo-list { list-style: none; padding: 0; margin: 0; }
.gh-repo-item { padding: var(--ui-4) 0; border-bottom: var(--ui-border) solid var(--ui-line-soft); margin: 0; }
.gh-repo-item__head { display: flex; align-items: center; gap: var(--ui-2); flex-wrap: wrap; font-size: 1.15rem; }
.gh-repo-item__head a { font-weight: 400; text-decoration: none; }
.gh-repo-item__head a strong { color: inherit; font-weight: 650; }
.gh-repo-item__head a:hover { text-decoration: underline; }
.gh-repo-item__desc { color: var(--ui-muted); margin: var(--ui-1) 0 var(--ui-2); font-size: .92rem; }
.gh-repo-item__meta { display: flex; gap: var(--ui-4); flex-wrap: wrap; font-size: .8rem; color: var(--ui-muted); align-items: center; }
.gh-lang-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; border: 1px solid color-mix(in srgb, var(--ui-text) 15%, transparent); }

/* ---------------------------------------------------------------- auth */
.gh-auth { max-width: 340px; margin: var(--ui-6) auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--ui-4); }
.gh-auth h1 { font-size: 1.5rem; font-weight: 400; letter-spacing: -.02em; margin: 0; }
.gh-auth form, .gh-auth > .ui-card, .gh-auth .ui-alert { width: 100%; text-align: left; margin: 0; box-sizing: border-box; }
.gh-owner-row { display: flex; align-items: flex-end; gap: var(--ui-2); }
.gh-owner-row .ui-field { margin: 0; }
.gh-owner-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border: var(--ui-border) solid var(--ui-line); border-radius: var(--ui-radius-sm); background: var(--ui-surface); font-weight: 600; white-space: nowrap; }
.gh-slash + .ui-field { flex: 1; }
.gh-owner-row .gh-slash { font-size: 1.4rem; padding-bottom: .35rem; }
.gh-vis { display: flex; gap: var(--ui-3); align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; }
.gh-vis .gh-ic { margin-top: .3rem; width: 22px; height: 22px; color: var(--ui-muted); }
.gh-vis input { margin-top: .4rem; }

/* ------------------------------------------------------------- explore */
.gh-explore__search { display: flex; gap: var(--ui-2); }
.gh-explore__search input { flex: 1; }
.gh-users { display: flex; flex-wrap: wrap; gap: var(--ui-2); }
.gh-user-chip { display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .7rem .3rem .35rem; border: var(--ui-border) solid var(--ui-line); border-radius: 999px; color: var(--ui-text); text-decoration: none; font-weight: 600; }

/* ------------------------------------------------------ profile / tabs */
.gh-profile { display: grid; grid-template-columns: 290px 1fr; gap: var(--ui-6); }
.gh-profile__name { font-size: 1.6rem; margin: var(--ui-3) 0 var(--ui-2); }
.gh-bio { color: var(--ui-text); }
.gh-tabs { display: flex; gap: var(--ui-1); overflow-x: auto; border-bottom: var(--ui-border) solid var(--ui-line-soft); margin-bottom: var(--ui-4); scrollbar-width: none; }
.gh-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .8rem; color: var(--ui-text); text-decoration: none; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.gh-tab:hover { color: var(--ui-text); border-bottom-color: var(--ui-line); }
.gh-tab.is-on { font-weight: 650; border-bottom-color: hsl(20 90% 58%); }
.gh-tab .gh-ic { color: var(--ui-muted); }
.gh-settings { display: grid; grid-template-columns: 260px 1fr; gap: var(--ui-6); }
.gh-sidenav { display: flex; flex-direction: column; margin-top: var(--ui-4); }
.gh-sidenav a { padding: .4rem .7rem; border-radius: var(--ui-radius-sm); color: var(--ui-text); text-decoration: none; font-size: .92rem; }
.gh-sidenav a:hover { background: var(--ui-surface); }
.gh-tokens { list-style: none; padding: 0; }
.gh-token { display: flex; justify-content: space-between; align-items: center; gap: var(--ui-3); padding: var(--ui-3) 0; border-bottom: var(--ui-border) solid var(--ui-line-soft); }
.gh-token form { margin: 0; }

/* ----------------------------------------------------------- repository */
.gh-repohead { margin-bottom: var(--ui-4); }
.gh-repohead__title { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: 1.25rem; margin-bottom: var(--ui-3); }
.gh-repohead__title > .gh-ic { color: var(--ui-muted); margin-right: .2rem; }
.gh-repohead__title a { text-decoration: none; }
.gh-repohead__title a:hover { text-decoration: underline; }
.gh-repohead__title .ui-badge { font-size: .72rem; margin-left: .3rem; }
.gh-starform { margin: 0; }
.gh-starred .gh-ic { color: #e3b341; }

.gh-repo { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: var(--ui-6); }
.gh-toolbar { display: flex; align-items: center; gap: var(--ui-2); flex-wrap: wrap; margin-bottom: var(--ui-3); }
.gh-branchsel .ui-btn { max-width: 16rem; }
.gh-menu-scroll { max-height: 22rem; overflow-y: auto; }
.gh-crumbs { font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: center; margin-left: var(--ui-2); }
.gh-crumbs a { text-decoration: none; }
.gh-crumbs a:hover { text-decoration: underline; }

.gh-commitbar { display: flex; align-items: center; gap: var(--ui-2); padding: var(--ui-2) var(--ui-4); background: var(--ui-surface); font-size: .88rem; min-height: 3.1rem; box-sizing: border-box; flex-wrap: wrap; }
.gh-box > .gh-commitbar:not(:last-child) { border-bottom: var(--ui-border) solid var(--ui-line); }
.gh-commitbar__msg { color: var(--ui-muted); text-decoration: none; min-width: 0; max-width: 32rem; }
.gh-commitbar__msg:hover { color: var(--ui-accent); text-decoration: underline; }
.gh-commitbar__count { color: var(--ui-text); font-weight: 600; text-decoration: none; display: inline-flex; gap: .3rem; align-items: center; margin-left: var(--ui-2); }

table.gh-files { margin: 0; border: 0; border-radius: 0; background: none; table-layout: fixed; backdrop-filter: none; }
.gh-files td { padding: .5rem var(--ui-4); font-size: .9rem; border-top: var(--ui-border) solid var(--ui-line-soft); }
.gh-files tr:first-child td { border-top: 0; }
.gh-files tbody tr:hover { background: var(--ui-surface); }
.gh-files__name { width: 32%; }
.gh-files__name a { color: var(--ui-text); text-decoration: none; display: inline-flex; gap: .55rem; align-items: center; max-width: 100%; }
.gh-files__name a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-files__name a:hover span { color: var(--ui-accent); text-decoration: underline; }
.gh-files__name--tree .gh-ic { color: #7ea7d8; }
.gh-files__name--blob .gh-ic { color: var(--ui-muted); }
.gh-files__msg a { color: var(--ui-muted); text-decoration: none; }
.gh-files__msg a:hover { color: var(--ui-accent); text-decoration: underline; }
.gh-files__when { width: 9rem; text-align: right; color: var(--ui-muted); white-space: nowrap; }

.gh-md { padding: var(--ui-5) var(--ui-6); max-width: none; }
.gh-md > :first-child { margin-top: 0; }
.gh-md > :last-child { margin-bottom: 0; }
.gh-md p { max-width: none; }
.gh-md h1, .gh-md h2 { padding-bottom: .3em; border-bottom: var(--ui-border) solid var(--ui-line-soft); letter-spacing: -.02em; font-weight: 650; }
.gh-md h1 { font-size: 2em; }
.gh-md h2 { font-size: 1.5em; }
.gh-md h3 { font-size: 1.25em; }
.gh-md img { display: inline-block; border-radius: 0; vertical-align: middle; }
.gh-md a img { display: inline-block; }
.gh-md p[align="center"], .gh-md div[align="center"], .gh-md center { text-align: center; }
.gh-md p[align="center"] img, .gh-md div[align="center"] img { display: inline-block; }
.gh-md pre { color: var(--ui-text); background: var(--ui-surface); backdrop-filter: none; }
.gh-md :not(pre) > code { white-space: normal; }
.gh-md .md-table { overflow-x: auto; margin-block: var(--ui-4); }
.gh-md .md-table table { width: auto; margin: 0; }
.gh-md .md-table thead th { text-transform: none; letter-spacing: 0; font-family: var(--ui-font); font-size: .9rem; color: var(--ui-text); }
.gh-md .md-table td, .gh-md .md-table th { border-left: var(--ui-border) solid var(--ui-line-soft); }
.gh-md li.md-task { list-style: none; margin-left: -1.2em; }
.gh-md li.md-task input { margin: 0 .4em 0 0; vertical-align: -2px; }
.gh-md blockquote { color: var(--ui-muted); border-left: 3px solid var(--ui-line); }
.gh-md .md-alert--note { border-left-color: var(--ui-info); }
.gh-md .md-alert--tip { border-left-color: var(--ui-ok); }
.gh-md .md-alert--important { border-left-color: hsl(270 70% 65%); }
.gh-md .md-alert--warning { border-left-color: var(--ui-warn); }
.gh-md .md-alert--caution { border-left-color: var(--ui-bad); }
.gh-md--blob { padding: var(--ui-5) var(--ui-7); }
.gh-plainreadme { margin: 0; border: 0; border-radius: 0; background: none; white-space: pre-wrap; color: var(--ui-text); }

.gh-repo__side .gh-h:first-child { margin-top: 0; font-size: 1.05rem; }
.gh-about__sec { padding-bottom: var(--ui-4); border-bottom: var(--ui-border) solid var(--ui-line-soft); margin-bottom: var(--ui-4); }
.gh-about__sec:last-child { border-bottom: 0; }
.gh-about__desc { font-size: 1rem; color: var(--ui-text); }
.gh-about__list { list-style: none; padding: 0; margin: 0; font-size: .88rem; color: var(--ui-muted); }
.gh-about__list li { margin-block: var(--ui-2); display: flex; align-items: center; gap: .45rem; }
.gh-about__list a { color: var(--ui-muted); text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.gh-about__list a:hover { color: var(--ui-accent); }
.gh-about__list strong { color: var(--ui-text); }
.gh-langbar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: var(--ui-3); background: var(--ui-surface-2); }
.gh-langbar span { display: block; min-width: 2px; }
.gh-langs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .2rem var(--ui-4); font-size: .8rem; }
.gh-langs li { display: flex; align-items: center; gap: .35rem; margin: 0; }

.gh-clone { min-width: 340px; padding: var(--ui-2); }
.gh-clone__row { display: flex; align-items: center; gap: var(--ui-1); }
.gh-clone__row input { font-size: .8rem; padding-block: .35rem; }
.gh-clone__row--lg { margin-block: var(--ui-3); }
.gh-clone__row--lg input { flex: 1; }
.gh-clone__hint { margin: var(--ui-2) 0; padding-inline: var(--ui-1); }
.ui-menu .gh-iconbtn { width: 28px; height: 28px; padding: 0; display: inline-grid; flex: none; }

.gh-setup__quick { background: color-mix(in srgb, var(--ui-accent) 8%, var(--ui-bg-alt)); }
.gh-setup h3 { font-size: 1rem; }
.gh-setup pre { color: var(--ui-text); }

/* ---------------------------------------------------------------- file */
.gh-filehead { font-family: var(--ui-font); }
.gh-filehead .ui-segmented { display: inline-flex; gap: 0; }
.gh-filehead .ui-segmented .ui-btn { border-radius: 0; }
.gh-filehead .ui-segmented .ui-btn:first-child { border-radius: var(--ui-radius-sm) 0 0 var(--ui-radius-sm); }
.gh-filehead .ui-segmented .ui-btn:last-child { border-radius: 0 var(--ui-radius-sm) var(--ui-radius-sm) 0; }
.gh-filehead .ui-segmented .is-on { background: var(--ui-surface-2); font-weight: 650; }
.gh-code { display: flex; overflow-x: auto; font-size: .82rem; background: var(--ui-bg-alt); }
.gh-code pre { margin: 0; border: 0; border-radius: 0; background: none; backdrop-filter: none; padding: var(--ui-3) var(--ui-3); line-height: 1.55; font-size: 1em; overflow: visible; }
.gh-code__nums { text-align: right; color: var(--ui-faint); user-select: none; -webkit-user-select: none; min-width: 3.2rem; position: sticky; left: 0; background: var(--ui-bg-alt); padding-right: var(--ui-4) !important; }
.gh-code__src { color: var(--ui-text); flex: 1; tab-size: 4; }
.gh-imgview { padding: var(--ui-5); text-align: center; background: repeating-conic-gradient(var(--ui-surface) 0 25%, transparent 0 50%) 0 0 / 20px 20px; }
.gh-imgview img { display: inline-block; border-radius: 0; }
.tk-c { color: var(--ui-faint); font-style: italic; }
.tk-s { color: hsl(200 70% 72%); }
.tk-k { color: hsl(355 85% 72%); }
.tk-n { color: hsl(210 90% 74%); }
.tk-f { color: hsl(275 80% 78%); }
.tk-t { color: hsl(30 90% 68%); }
[data-theme="light"] .tk-s { color: hsl(215 80% 32%); }
[data-theme="light"] .tk-k { color: hsl(355 70% 45%); }
[data-theme="light"] .tk-n { color: hsl(210 80% 38%); }
[data-theme="light"] .tk-f { color: hsl(270 60% 42%); }
[data-theme="light"] .tk-t { color: hsl(25 90% 38%); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .tk-s { color: hsl(215 80% 32%); }
  :root:not([data-theme="dark"]) .tk-k { color: hsl(355 70% 45%); }
  :root:not([data-theme="dark"]) .tk-n { color: hsl(210 80% 38%); }
  :root:not([data-theme="dark"]) .tk-f { color: hsl(270 60% 42%); }
  :root:not([data-theme="dark"]) .tk-t { color: hsl(25 90% 38%); }
}

/* ------------------------------------------------------------- commits */
.gh-cgroup__day { font-size: .9rem; font-weight: 500; color: var(--ui-muted); display: flex; align-items: center; gap: .5rem; margin: var(--ui-5) 0 var(--ui-2); }
.gh-clist { list-style: none; padding: 0; }
.gh-crow { display: flex; gap: var(--ui-3); padding: var(--ui-3) var(--ui-4); border-top: var(--ui-border) solid var(--ui-line-soft); margin: 0; align-items: center; }
.gh-crow:first-child { border-top: 0; }
.gh-crow:hover { background: var(--ui-surface); }
.gh-crow__main { flex: 1; min-width: 0; }
.gh-crow__msg { color: var(--ui-text); font-weight: 600; text-decoration: none; }
.gh-crow__msg:hover { color: var(--ui-accent); text-decoration: underline; }
.gh-crow__side { display: flex; gap: var(--ui-1); align-items: center; }
.gh-cbody { display: inline; margin: 0 0 0 .4rem; }
.gh-cbody summary { display: inline; cursor: pointer; padding: 0 .35rem; background: var(--ui-surface-2); border-radius: 4px; font-size: .75rem; list-style: none; }
.gh-cbody summary::-webkit-details-marker { display: none; }
.gh-cbody pre { white-space: pre-wrap; font-size: .8rem; margin: var(--ui-2) 0; }
.gh-pager { margin-top: var(--ui-5); }
.gh-pager [aria-disabled] { opacity: .45; pointer-events: none; }

.gh-commithead { padding: 0; }
.gh-commithead__top { display: flex; gap: var(--ui-3); align-items: flex-start; padding: var(--ui-4); }
.gh-commithead__title { font-size: 1.3rem; margin: 0; flex: 1; letter-spacing: -.02em; font-weight: 600; }
.gh-commithead__body { margin: 0 var(--ui-4) var(--ui-4); white-space: pre-wrap; background: none; border: 0; padding: 0; color: var(--ui-muted); }
.gh-commithead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-2) var(--ui-3); padding: var(--ui-3) var(--ui-4); background: var(--ui-surface); border-top: var(--ui-border) solid var(--ui-line); font-size: .88rem; }
.gh-sha { color: var(--ui-text); }
.gh-diffsum { font-size: .9rem; max-width: none; }
.gh-add { color: var(--ui-ok); }
.gh-del { color: var(--ui-bad); }
.gh-toc { margin-block: 0 var(--ui-4); }
.gh-toc summary { cursor: pointer; font-size: .9rem; color: var(--ui-muted); }
.gh-toc ul { list-style: none; padding: 0; font-size: .85rem; }
.gh-toc li { display: flex; gap: .5rem; align-items: center; }
.gh-dstat { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: .4rem; background: var(--ui-warn); }
.gh-dstat--added { background: var(--ui-ok); }
.gh-dstat--deleted { background: var(--ui-bad); }
.gh-diff details { margin: 0; }
.gh-diff__head { cursor: pointer; list-style: none; }
.gh-diff__head::-webkit-details-marker { display: none; }
.gh-diff details:not([open]) .gh-diff__head { border-bottom: 0; }
.gh-diff details:not([open]) .gh-diff__head .gh-ic { transform: rotate(-90deg); }
.gh-diff__name { font-size: .85rem; font-weight: 600; word-break: break-all; }
.gh-diff__stat { font-size: .78rem; font-family: var(--ui-mono); }
.gh-dbadge--added { color: var(--ui-ok); }
.gh-dbadge--deleted { color: var(--ui-bad); }
table.gh-diff__t { margin: 0; border: 0; border-radius: 0; background: none; backdrop-filter: none; font-family: var(--ui-mono); font-size: .78rem; line-height: 1.5; table-layout: auto; }
.gh-diff__t td { padding: 0 var(--ui-2); border: 0 !important; white-space: pre; vertical-align: top; }
.gh-diff__t tbody tr:hover { background: none; }
.gh-diff__t tr:hover { background: none; }
.gh-d-n { width: 1%; min-width: 3rem; text-align: right; color: var(--ui-faint); user-select: none; -webkit-user-select: none; }
.gh-d-c { width: 100%; color: var(--ui-text); }
.gh-d-s { user-select: none; -webkit-user-select: none; display: inline-block; width: 1.2em; color: var(--ui-faint); }
.gh-d-add { background: color-mix(in srgb, var(--ui-ok) 14%, transparent); }
.gh-d-add .gh-d-n { background: color-mix(in srgb, var(--ui-ok) 22%, transparent); }
.gh-d-del { background: color-mix(in srgb, var(--ui-bad) 14%, transparent); }
.gh-d-del .gh-d-n { background: color-mix(in srgb, var(--ui-bad) 22%, transparent); }
.gh-d-hunk td { background: color-mix(in srgb, var(--ui-accent) 12%, transparent); color: var(--ui-muted); padding-block: .2rem !important; }
.gh-diff__note { padding: var(--ui-4) !important; color: var(--ui-muted); text-align: center; font-family: var(--ui-font); white-space: normal !important; }

/* ------------------------------------------------------------ branches */
.gh-blist { list-style: none; padding: 0; }
.gh-brow { display: flex; align-items: center; gap: var(--ui-3); padding: var(--ui-3) var(--ui-4); border-top: var(--ui-border) solid var(--ui-line-soft); margin: 0; }
.gh-brow:first-child { border-top: 0; }
.gh-brow__name { font-weight: 600; text-decoration: none; background: color-mix(in srgb, var(--ui-accent) 12%, transparent); padding: .1rem .45rem; border-radius: 6px; font-size: .85rem; display: inline-flex; gap: .35rem; align-items: center; }
.gh-brow .ui-small a { color: var(--ui-muted); }
.gh-newbranch { display: flex; gap: var(--ui-2); align-items: center; padding: var(--ui-3); flex-wrap: wrap; }
.gh-newbranch input { flex: 1; width: auto; min-width: 10rem; }
.gh-newbranch select { width: auto; }

/* ---------------------------------------------------------- edit/upload */
.gh-pathin { width: auto !important; display: inline-block !important; min-width: 16rem; flex: 0 1 28rem; padding-block: .3rem !important; }
.gh-editform .gh-box { margin: 0; }
textarea.gh-editor { border: 0; border-radius: 0; min-height: 65vh; padding: var(--ui-4); font-size: .85rem; line-height: 1.55; tab-size: 4; resize: vertical; white-space: pre; overflow: auto; background: var(--ui-bg-alt); backdrop-filter: none; }
.gh-uplist { list-style: none; padding: 0; margin: 0; }
.gh-uplist li { display: flex; gap: var(--ui-3); align-items: center; padding: var(--ui-2) var(--ui-4); border-top: var(--ui-border) solid var(--ui-line-soft); margin: 0; }
.gh-uplist li:first-child { border-top: 0; }
.gh-uplist .ui-mono { flex: 1; font-size: .85rem; }
.gh-upcommit { padding: var(--ui-4); }
.gh-upload .ui-dropzone .gh-ic { width: 40px; height: 40px; }
.gh-upload label.ui-btn input { display: none; }

/* -------------------------------------------------------------- issues */
.gh-ifilter { margin: 0; flex: 1; max-width: 32rem; }
.gh-ihead { gap: var(--ui-4); }
.gh-ihead a { color: var(--ui-muted); font-weight: 400; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.gh-ihead a.is-on { color: var(--ui-text); font-weight: 650; }
.gh-ilist { list-style: none; padding: 0; margin: 0; }
.gh-ilist .gh-blank { border: 0; }
.gh-irow { display: flex; gap: var(--ui-3); padding: var(--ui-3) var(--ui-4); border-top: var(--ui-border) solid var(--ui-line-soft); margin: 0; align-items: flex-start; }
.gh-irow:first-child { border-top: 0; }
.gh-irow:hover { background: var(--ui-surface); }
.gh-irow__main { flex: 1; min-width: 0; }
.gh-irow__title { color: var(--ui-text); font-weight: 650; text-decoration: none; }
.gh-irow__title:hover { color: var(--ui-accent); }
.gh-istate { padding-top: .15rem; }
.gh-istate--open { color: var(--ui-ok); }
.gh-istate--closed { color: hsl(270 60% 65%); }
.gh-issue__title { font-size: 2rem; font-weight: 400; letter-spacing: -.02em; margin: 0 0 var(--ui-2); }
.gh-issue__meta { padding-bottom: var(--ui-4); border-bottom: var(--ui-border) solid var(--ui-line-soft); margin-bottom: var(--ui-5); display: flex; gap: var(--ui-2); align-items: center; flex-wrap: wrap; }
.gh-ibadge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border-radius: 999px; color: #fff; font-weight: 600; font-size: .88rem; }
.gh-ibadge--open { background: hsl(140 55% 36%); }
.gh-ibadge--closed { background: hsl(270 50% 50%); }
.gh-timeline { max-width: 900px; }
.gh-comment { display: flex; gap: var(--ui-3); align-items: flex-start; margin-bottom: var(--ui-4); }
.gh-comment__box { flex: 1; min-width: 0; margin: 0; }
.gh-comment__box .gh-box__head { min-height: 2.5rem; }
.gh-comment__box .gh-md { padding: var(--ui-3) var(--ui-4); }
.gh-comment form, form.gh-comment__box { margin: 0; }
.gh-event { margin: 0 0 var(--ui-4) 3.2rem; color: var(--ui-muted); font-size: .88rem; display: flex; gap: .4rem; align-items: center; }
.gh-issueform .ui-field { margin: 0; }

/* ------------------------------------------------------------- danger */
.gh-danger { border-color: color-mix(in srgb, var(--ui-bad) 55%, var(--ui-line)); }
.gh-danger__row { display: flex; gap: var(--ui-3); align-items: center; justify-content: space-between; padding: var(--ui-4); border-top: var(--ui-border) solid var(--ui-line-soft); flex-wrap: wrap; }
.gh-danger__row:first-child { border-top: 0; }
.gh-danger__row form { margin: 0; }

/* -------------------------------------------------------------- narrow */
@media (max-width: 900px) {
  .gh-repo, .gh-dash, .gh-profile, .gh-settings, .gh-hero { grid-template-columns: 1fr; }
  .gh-repo__side { order: -1; }
  .gh-files__msg { display: none; }
  .gh-files__name { width: auto; }
  .gh-av--xl { width: 96px; font-size: 2.5rem; }
  .gh-search, .gh-nav { display: none; }
  .gh-md, .gh-md--blob { padding: var(--ui-4); }
  .gh-main { padding-inline: var(--ui-3); }
  .gh-top { padding-inline: var(--ui-3); }
}
