/* HackerRepos. The system lives in DESIGN.md: HN paper and orange, Schibsted Grotesk + JetBrains Mono, flat, light only.
   Scrolling is the browser's own: no scroll listeners, no hidden scrollbars. */
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #f6f6ef; --surface: #fff; --text: #1d1d1b; --text-2: #3d3c37; --muted: #6c6b63;
  --line: #e2e0d5; --line-2: #d6d3c5; --orange: #ff6600; --orange-ink: #b54708;
  --s0: #e4e2d7; --s1: #ffd8b8; --s2: #ffb27a; --s3: #ff8a3d; --s4: #e65c00;
  --sans: "Schibsted Grotesk", ui-sans-serif, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; transition: color .12s; }
a:hover { color: var(--orange-ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 2px; }
[id] { scroll-margin-top: 80px; }  /* anchors land below the sticky header */
img { display: block; }
button, input, select { font: inherit; color: inherit; }
code, pre, kbd, .mono { font-family: var(--mono); }
.oc { width: 16px; height: 16px; fill: currentColor; flex: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.u { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.u:hover { text-decoration-color: currentColor; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand svg { flex: none; }
.nav { display: flex; gap: 22px; font-size: 15px; color: var(--text-2); }
.nav a { padding: 4px 0; white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--orange); }
.top-search { margin-left: auto; width: 240px; }
.rss { display: grid; place-items: center; flex: none; }
.rss svg { display: block; }
body.no-top-search .top-search { display: none; }
body.no-top-search .rss { margin-left: auto; }
@media (max-width: 900px) { .top-search { display: none; } .rss { margin-left: auto; } }
@media (max-width: 600px) { .nav .wide { display: none; } .top .wrap { gap: 16px; } .nav { gap: 16px; } }

/* inputs and buttons */
.field { position: relative; display: block; flex: 1; min-width: 0; }
.field .oc { position: absolute; left: 14px; top: 50%; margin-top: -8px; color: var(--muted); pointer-events: none; }
.field input { width: 100%; height: 38px; padding: 0 12px 0 38px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); }
.field input:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 3px rgba(255, 102, 0, .2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: border-color .12s, background .12s; }
.btn:hover { border-color: var(--text-2); color: var(--text); }
.btn.primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn.primary:hover { background: #000; color: #fff; }
.linkish { padding: 0; border: 0; background: none; color: var(--orange-ink); font-weight: 600; cursor: pointer; }
.linkish:hover { text-decoration: underline; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; }
.topography-container { position: relative; width: 100%; height: 100%; overflow: hidden; }
.topography-canvas { display: block; width: 100%; height: 100%; }
.hero-inner { position: relative; padding-top: 96px; padding-bottom: 80px; }
.hero h1 { max-width: 780px; margin: 0; font-size: clamp(36px, 5.6vw, 60px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; }
.lede { max-width: 580px; margin: 20px 0 0; color: var(--text-2); font-size: 18px; }
.hero-search { display: flex; max-width: 580px; margin-top: 32px; padding: 5px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); }
.hero-search:focus-within { border-color: var(--text-2); box-shadow: 0 0 0 3px rgba(255, 102, 0, .2); }
.hero-search .field input { height: 42px; border: 0; box-shadow: none; font-size: 17px; }
.hero-search .btn { height: 42px; }
.meta-line { margin-top: 18px; color: var(--muted); font-size: 14px; }
.meta-line a { color: var(--text-2); }
@media (max-width: 640px) { .hero-inner { padding-top: 56px; padding-bottom: 52px; } .hero-bg { opacity: .5; } }  /* lines cross the text on narrow screens */

/* sections, tabs */
.section { padding: 56px 0 0; }
.section:last-child { padding-bottom: 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.section-head h2 { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 750; letter-spacing: -.02em; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--orange-ink); font-weight: 600; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.tabs { display: flex; gap: 22px; margin-top: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 8px 0 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: color .12s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-pressed="true"], .tabs button[aria-selected="true"] { border-bottom-color: var(--orange); color: var(--text); }
.tabs .n { margin-left: 6px; color: var(--muted); font: 500 12px var(--mono); }
.hint { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* entries: the numbered list every view shares */
.entries { margin: 0; padding: 0; list-style: none; }
.entry { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rank { padding-top: 3px; color: var(--muted); font: 500 15px/1.5 var(--mono); text-align: right; }
.q { margin: 0; font-size: 19px; line-height: 1.5; font-weight: 450; overflow-wrap: anywhere; }
.q a:hover { color: var(--text); }
.q .hang { margin-left: -.42em; }
.q.none { color: var(--muted); font-size: 16px; }
.repo-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.repo-line .name { color: var(--text); font: 600 15px var(--mono); overflow-wrap: anywhere; }
.repo-line .name:hover { color: var(--orange-ink); }
.owner { color: var(--muted); font-weight: 400; }
.desc { margin: 2px 0 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.byline { margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.byline a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.byline a:hover { color: var(--orange-ink); text-decoration-color: currentColor; }
.side { padding-top: 5px; color: var(--muted); font: 13px/1.6 var(--mono); text-align: right; white-space: nowrap; }
.side b { color: var(--text); font-weight: 600; }
.side a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.side .strip { margin-bottom: 6px; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.tag { padding: 0 6px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--muted); font: 500 11px/18px var(--mono); }
@media (max-width: 720px) {
  .entry { grid-template-columns: 28px minmax(0, 1fr); }
  .side { grid-column: 2; margin-top: 10px; text-align: left; white-space: normal; }
  .q { font-size: 17px; }
}

/* the activity strip: one square per year, GitHub-style */
.strip { display: inline-flex; gap: 3px; vertical-align: middle; }
.strip i { width: 10px; height: 10px; border-radius: 2px; background: var(--s0); }
.strip .l1 { background: var(--s1); } .strip .l2 { background: var(--s2); } .strip .l3 { background: var(--s3); } .strip .l4 { background: var(--s4); }
.strip.big { gap: 4px; }
.strip.big i { width: 16px; height: 16px; border-radius: 3px; }
.years { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font: 12px var(--mono); }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 12px var(--mono); }
@media (max-width: 420px) { .strip.big i { width: 11px; height: 11px; } .strip.big { gap: 3px; } }

/* topic and language index */
.index { columns: 4 160px; column-gap: 28px; margin: 12px 0 0; padding: 0; list-style: none; }
.index li { padding: 4px 0; break-inside: avoid; }
.index a { display: flex; justify-content: space-between; gap: 8px; }
.index .n { color: var(--muted); font: 13px var(--mono); }
.subhead { margin-top: 40px; }

/* browse */
.page-head { padding-top: 40px; }
.page-head h1 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; }
.searchbar { margin-top: 20px; }
.searchbar .field input { height: 46px; font-size: 16px; }
.browse { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; padding: 20px 0 72px; }
.filters summary { display: none; }
.facet + .facet { margin-top: 24px; }
.facet h2 { margin: 0 0 6px; color: var(--muted); font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.facet details summary { display: block; padding: 4px 0; color: var(--orange-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.opts { margin: 0; padding: 0; list-style: none; }
.opt { display: flex; width: 100%; align-items: baseline; gap: 8px; padding: 4px 0; border: 0; background: none; color: var(--text-2); font-size: 15px; text-align: left; cursor: pointer; }
.opt:hover { color: var(--text); }
.opt[aria-pressed="true"] { color: var(--text); font-weight: 700; box-shadow: inset 2px 0 0 var(--orange); padding-left: 10px; }
.opt .label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .n { margin-left: auto; color: var(--muted); font: 13px var(--mono); }
.resultbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 30px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.resultbar strong { color: var(--text); font-family: var(--mono); }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px 0 10px; border: 1px solid var(--line-2); border-radius: 9999px; background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; }
.pill:hover { border-color: var(--text-2); }
.morewrap { display: flex; justify-content: center; margin-top: 28px; }
.empty { margin-top: 16px; padding: 48px 16px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--muted); text-align: center; }
.skeleton { height: 92px; margin-top: 14px; border-radius: 4px; background: #efeee6; }
@media (max-width: 860px) {
  .browse { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
  .filters summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-weight: 700; list-style: none; cursor: pointer; }
  .filters summary::-webkit-details-marker { display: none; }
  .filters summary::after { content: ""; width: 7px; height: 7px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
  .filters[open] summary::after { transform: translateY(2px) rotate(-135deg); }
  .filters[open] summary { border-bottom: 1px solid var(--line); }
  .filters .facets { padding: 16px; }
}

/* repo page */
.crumbs { padding-top: 24px; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--text-2); }
.repo-top { display: flex; align-items: flex-start; gap: 20px; padding: 14px 0 0; }
.avatar { width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 6px; background: var(--s0); flex: none; }
.repo-top h1 { margin: 0; font: 700 clamp(24px, 4vw, 34px)/1.2 var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
.repo-desc { max-width: 700px; margin: 10px 0 0; color: var(--text-2); font-size: 19px; overflow-wrap: anywhere; }
.facts-line { max-width: 760px; margin: 22px 0 0; color: var(--text-2); font-size: 17px; }
.facts-line b { color: var(--text); }
.activity { display: inline-block; margin-top: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.repo-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; padding: 32px 0 72px; }
.repo-body .tabs { margin-top: 0; margin-bottom: 28px; }
.panel h2 { margin: 0 0 16px; font-size: 22px; font-weight: 750; letter-spacing: -.015em; }
.panel h2 + .muted { margin: -10px 0 16px; }
.highlights { display: grid; gap: 28px; margin: 0 0 44px; }
.highlight { margin: 0; }
.highlight p { margin: 0; font-size: 21px; line-height: 1.45; font-weight: 450; letter-spacing: -.01em; white-space: pre-line; overflow-wrap: anywhere; }
.highlight .hang { margin-left: -.42em; }
.year { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 4px; font: 600 15px var(--mono); }
.year span { color: var(--muted); font-weight: 400; }
.recs { margin: 0; padding: 0; list-style: none; }
.rec { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rec p { margin: 0; color: var(--text-2); font-size: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.aside { position: sticky; top: 84px; }
.aside h2 { margin: 0 0 10px; color: var(--muted); font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 24px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.topic-list { display: flex; flex-wrap: wrap; gap: 6px 12px; font: 13px var(--mono); }
.topic-list a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
@media (max-width: 900px) { .repo-body { grid-template-columns: minmax(0, 1fr); gap: 28px; } .aside { position: static; } }
@media (max-width: 640px) { .repo-top { gap: 14px; } .avatar { width: 44px; height: 44px; } .highlight p { font-size: 18px; } }

/* about */
.prose { max-width: 700px; padding: 48px 0 80px; }
.prose h1 { margin: 0 0 14px; font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.prose h2 { margin: 40px 0 10px; font-size: 22px; font-weight: 750; letter-spacing: -.015em; }
.prose p, .prose li, .prose dd { color: var(--text-2); }
.prose a:not(.btn) { color: var(--orange-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose dt { margin-top: 14px; font-weight: 700; }
.prose dd { margin: 2px 0 0; }
.prose .actions { margin-top: 16px; }
.lead { font-size: 19px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot p { margin: 0; max-width: 560px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--text-2); }

/* README, as GitHub's API renders it */
.readme-body { font-size: 16px; line-height: 1.6; overflow-wrap: break-word; }
.readme-body > :first-child, .readme-body > :first-child > :first-child { margin-top: 0 !important; }
.readme-body :is(h1, h2, h3, h4, h5, h6) { margin: 24px 0 16px; font-weight: 700; line-height: 1.25; }
.readme-body :is(h1, h2) { padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.readme-body h1 { font-size: 2em; } .readme-body h2 { font-size: 1.5em; } .readme-body h3 { font-size: 1.25em; }
.readme-body h4 { font-size: 1em; } .readme-body h5 { font-size: .875em; } .readme-body h6 { font-size: .85em; color: var(--muted); }
.readme-body :is(p, blockquote, ul, ol, dl, table, pre, details) { margin: 0 0 16px; }
.readme-body :is(ul, ol) { padding-left: 2em; }
.readme-body li + li { margin-top: .25em; }
.readme-body a { color: var(--orange-ink); }
.readme-body img { max-width: 100%; }
.readme-body code { padding: .2em .4em; font-size: 85%; background: #ecebe3; border-radius: 4px; }
.readme-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.readme-body pre code { padding: 0; font-size: 100%; background: none; }
.readme-body blockquote { padding: 0 1em; color: var(--muted); border-left: .25em solid var(--line-2); }
.readme-body table { display: block; width: max-content; max-width: 100%; overflow: auto; border-collapse: collapse; }
.readme-body :is(th, td) { padding: 6px 13px; border: 1px solid var(--line); }
.readme-body tr:nth-child(2n) { background: #efeee6; }
.readme-body hr { height: 2px; margin: 24px 0; background: var(--line); border: 0; }
.readme-body .anchor { display: none; }
.readme-body .task-list-item { list-style: none; }
.readme-body .markdown-alert { padding: 8px 16px; margin-bottom: 16px; border-left: .25em solid var(--line-2); }
.readme-body svg.octicon { fill: currentColor; }
.readme-body .pl-c { color: #59636e; } .readme-body .pl-k { color: #cf222e; }
.readme-body :is(.pl-s, .pl-pds, .pl-sr) { color: #0a3069; } .readme-body :is(.pl-en, .pl-e) { color: #6639ba; }
.readme-body :is(.pl-c1, .pl-v) { color: #0550ae; } .readme-body .pl-ent { color: #116329; }
.readme-body img[src$="#gh-dark-mode-only"] { display: none; }
