/* gta6mods: design direction 1, "Library" (design/project/d1-library-*.dc.html). */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(schibsted-grotesk.woff2) format('woff2');
}

:root {
  --ink: #151515;
  --ink-2: #3d3d3d;
  --muted: #555555;
  --paper: #efefec;
  --card: #ffffff;
  --line: #d6d6d0;
  --rule: #e4e4df;
  --link: #1b4f9c;
  --link-hover: #0f2f5e;
  --warn: #8a4b00;
  --go: #c2410c;
  --go-hover: #9a3412;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Schibsted Grotesk', Arial, sans-serif; font-size: 16px; line-height: 1.45; }
a { color: var(--link); text-underline-offset: 2px; }
::selection { background: #c9d8ef; color: var(--ink); }
input, select, textarea { accent-color: var(--ink); }
.files td, .works td { font-variant-numeric: tabular-nums; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.hidden { position: absolute; left: -9999px; }
h1, h2, h3 { line-height: 1.2; }
code, .paths, .sha, pre { font-family: Consolas, 'Courier New', monospace; }

/* Header */
.top { background: var(--ink); color: #fff; }
.bar { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.logo:hover { color: #fff; }
.search { flex: 1 1 380px; display: flex; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 0 14px; min-height: 44px; border: 0; border-radius: 4px 0 0 4px; }
.search button { font: inherit; font-weight: 600; min-height: 44px; padding: 0 16px; border: 0; border-radius: 0 4px 4px 0; background: var(--line); color: var(--ink); cursor: pointer; }
.account { display: flex; gap: 18px; font-weight: 500; }
.account a { color: #fff; }

.subbar { background: var(--card); border-bottom: 1px solid var(--line); }
.subbar .bar { padding: 10px 20px; gap: 8px 28px; font-size: 14px; }
.build { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.build label { font-weight: 600; }
select, input, textarea { font: inherit; }
.build select, .stack select { min-height: 36px; padding: 0 8px; border: 1px solid #8d8d86; border-radius: 4px; background: var(--card); }
.kinds { display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 500; }
.kinds a { text-decoration: none; }
.kinds a.on { color: var(--ink); border-bottom: 2px solid var(--ink); }

/* Layout */
.page { max-width: 1240px; margin: 0 auto; padding: 20px; }
.page.narrow { max-width: 720px; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > main { flex: 999 1 620px; min-width: 0; }
.side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.box { padding: 16px; }
.box h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.box h2 { margin: 0 0 4px; font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { color: var(--warn); }
.error { color: #9f1d1d; font-weight: 600; }
.ok { color: #1d6b32; font-weight: 600; }
.alert { background: #fff4e5; border: 1px solid #e8c48f; padding: 10px 14px; border-radius: 4px; }
.note { font-size: 13px; color: var(--muted); line-height: 20px; padding: 0 4px; }
.foot { max-width: 1240px; margin: 0 auto; padding: 8px 20px 32px; font-size: 13px; color: var(--muted); }

/* The grid */
.browse { min-width: 0; }
.listhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 16px; margin: 0 0 14px; }
.listhead h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.tally { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.sorts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; font-weight: 600; }
.sorts a { text-decoration: none; padding: 4px 0; }
.sorts a:hover { text-decoration: underline; }
.sorts a.on { color: var(--ink); border-bottom: 2px solid var(--ink); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.tile:hover { border-color: #a8a8a1; }
.shot { display: block; background: var(--rule); text-decoration: none; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.nothumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; font-size: 13px; font-weight: 600; color: var(--muted); }
.tbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tile h2 { margin: 0; font-size: 16px; line-height: 21px; }
.tile .name { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .name:hover { text-decoration: underline; }
.by { margin: 0; color: var(--muted); font-size: 13px; }
.fit { margin: 2px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); display: flex; flex-direction: column; }
.works { color: #1d6b32; font-weight: 600; }
.fit .warn { font-weight: 600; }
.untried { color: var(--muted); }
.nums { margin: auto 0 0; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.nums b { color: var(--ink); font-weight: 700; }
.pager { margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.empty { padding: 20px 16px; margin: 0 0 14px; }
.empty p { margin: 0; }
.empty p + p { margin-top: 6px; }
.first { margin: 6px 0 0; padding-left: 20px; font-size: 14px; line-height: 22px; }
.put { margin: 12px 0 0; font-size: 14px; }
.put code { font-size: 13px; }
.untested { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 26px; }
.side .box > p.muted { margin: 0 0 12px; font-size: 14px; }
.hint { color: var(--muted); }
.kinds .count { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.kinds a.on .count { color: var(--ink-2); }

/* The mod page */
.modpage { padding: 16px 20px 48px; }
.crumbs { margin: 0 0 10px; font-size: 14px; }
.main h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.015em; }
.byline { margin: 4px 0 14px; font-size: 15px; color: var(--ink-2); }
.hero { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; background: var(--rule); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; display: block; }
.thumbs a.on img { outline: 3px solid var(--ink); outline-offset: -3px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 22px 0 0; border-bottom: 1px solid #c9c9c3; font-weight: 600; font-size: 15px; }
.tabs a { text-decoration: none; padding: 10px 0; }
.tabs a.on { color: var(--ink); border-bottom: 3px solid var(--ink); }
.panel { background: var(--card); border: 1px solid var(--line); border-top: 0; padding: 18px 20px; font-size: 16px; line-height: 25px; }
.panel > p { margin: 0 0 12px; }
.panel h2 { margin: 16px 0 8px; font-size: 17px; }
.panel h2:first-child { margin-top: 0; }
.panel p.small { margin: 0 0 8px; font-size: 14px; }
.paths { margin: 0; padding-left: 20px; font-size: 14px; line-height: 24px; }
.files { width: 100%; border-collapse: collapse; font-size: 14px; }
.files th, .files td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); }
.sha { word-break: break-all; }
.comment { border-bottom: 1px solid var(--rule); padding: 0 0 12px; margin: 0 0 12px; }
.comment p { margin: 0 0 6px; }
.comment h2, .comment h3 { margin: 0 0 4px; font-size: 16px; }
blockquote { margin: 0 0 8px; padding: 8px 12px; background: var(--paper); border-radius: 4px; }

.download { display: flex; align-items: center; justify-content: center; min-height: 50px; background: var(--go); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; border-radius: 4px; }
.download:hover { background: var(--go-hover); color: #fff; }
.side .sha { margin: 10px 0 0; }
.side p.small { margin: 6px 0 0; }
.needs { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 22px; }
.needs li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.needs li:last-child { border-bottom: 0; }
.works { border-collapse: collapse; width: 100%; font-size: 14px; }
.works th { text-align: left; padding: 5px 12px 5px 0; font-weight: 500; vertical-align: top; white-space: nowrap; }
.works td { padding: 5px 0; }
.works-form { margin: 10px 0 0; font-size: 14px; }
.checked { font-size: 14px; line-height: 21px; }
.checked p { margin: 0; }
.checked p + p { margin-top: 8px; }
.box h2 + p, .box h2 + ul, .box h2 + table { margin-top: 6px; }

.steps { margin: 6px 0 0; padding-left: 22px; font-size: 14px; line-height: 21px; }
.steps li + li { margin-top: 6px; }
.steps code { font-size: 13px; overflow-wrap: anywhere; }
.box .steps + p.small { margin-top: 10px; }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.stack label { font-weight: 600; margin-top: 8px; }
.stack label.check { font-weight: 400; margin-top: 2px; }
.stack input:not([type=checkbox]):not([type=radio]):not([type=file]), .stack textarea { padding: 8px 10px; border: 1px solid #8d8d86; border-radius: 4px; background: var(--card); }
.stack p { margin: 0; }
fieldset { border: 1px solid var(--rule); border-radius: 4px; padding: 8px 12px 12px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
legend { font-weight: 600; padding: 0 4px; }
.stack h2.part { margin: 22px 0 2px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 18px; }
.stack h2.part:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-weight: 400; }
.choice + .choice { border-top: 1px solid var(--rule); }
.choice input { margin-top: 4px; }
.choice .small { display: block; }
button, .button { font: inherit; font-weight: 600; min-height: 44px; padding: 0 16px; border: 0; border-radius: 4px; background: var(--ink); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button:hover, button:hover { background: #333; color: #fff; }
button.quiet { background: var(--card); color: var(--ink); border: 1px solid #8d8d86; min-height: 36px; padding: 0 12px; }
button.quiet:hover { background: var(--paper); color: var(--ink); }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); font: inherit; font-size: inherit; text-decoration: underline; cursor: pointer; }
.stack .button, .stack button { align-self: flex-start; margin-top: 8px; }
.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 8px 0 0; }
.inline input:not([type=checkbox]) { min-height: 36px; padding: 0 8px; border: 1px solid #8d8d86; border-radius: 4px; }
.status { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 3px; background: var(--rule); vertical-align: middle; }
.status.live { background: #dcefe1; color: #1d6b32; }
.status.rejected, .status.removed { background: #f6dede; color: #9f1d1d; }
.status.held { background: #fff1d6; color: var(--warn); }
.note-text { white-space: pre-wrap; font-size: 13px; background: var(--paper); padding: 8px 10px; border-radius: 4px; margin: 6px 0 0; }

@media (max-width: 560px) {
  .main h1 { font-size: 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tbody { padding: 8px 10px 10px; }
  .tile h2 { font-size: 15px; line-height: 20px; }
  .hint { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
