/* Skillmon. One bold thing: the score (skills as staves, changes as notes).
   Everything else is quiet: sage paper, ink, three change colours, ochre
   for frontmatter. */
:root {
  --paper: #eef1ec;
  --sheet: #f8faf6;
  --ink: #18202e;
  --graphite: #5b6474;
  --faint: #8a93a1;
  --rule: #cfd5cc;
  --staff: #c3cabf;
  --add: #23784a;
  --mod: #2b55c4;
  --del: #b3392b;
  --fm: #a87a12;
  --fm-wash: #f3e9c8;
  --add-wash: #e3f2e7;
  --del-wash: #f8e6e3;
  --add-mark: #a6dbb7;
  --del-mark: #f1b4ab;
  --hover: #e2e7df;
  --focus: #2b55c4;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --row: 15px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #141922; --sheet: #1b212b; --ink: #e5e9e2; --graphite: #9ba4b1; --faint: #6f7886;
    --rule: #2c3440; --staff: #343d4a; --add: #4fb37a; --mod: #7d9cf3; --del: #e3705f; --fm: #d8ad47;
    --fm-wash: #3a321b; --add-wash: #1d3527; --del-wash: #3e2220; --add-mark: #2c6c47; --del-mark: #823a33; --hover: #222a35; --focus: #7d9cf3;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #141922; --sheet: #1b212b; --ink: #e5e9e2; --graphite: #9ba4b1; --faint: #6f7886;
  --rule: #2c3440; --staff: #343d4a; --add: #4fb37a; --mod: #7d9cf3; --del: #e3705f; --fm: #d8ad47;
  --fm-wash: #3a321b; --add-wash: #1d3527; --del-wash: #3e2220; --add-mark: #2c6c47; --del-mark: #823a33; --hover: #222a35; --focus: #7d9cf3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
}
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .92em; }

.masthead, main, .foot { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .masthead, main, .foot { padding: 0 16px; } }

.masthead { display: flex; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.sources { display: flex; gap: 4px; flex-wrap: wrap; }
.sources a { padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--graphite); font-weight: 500; }
.sources a[aria-current] { background: var(--ink); color: var(--paper); }

.loading, .empty { color: var(--graphite); padding: 64px 0; }

/* Source overview ---------------------------------------------------- */
.hero { padding: 40px 0 28px; }
.hero h1 {
  font-size: clamp(64px, 12vw, 168px);
  line-height: .84;
  letter-spacing: -.055em;
  font-weight: 900;
  margin: 0 0 22px -.04em;
}
.lede { font-size: 21px; line-height: 1.45; max-width: 46ch; margin: 0; color: var(--ink); }
.lede a { font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--graphite); font-size: 14px; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend svg { overflow: visible; }

/* The score */
.score { display: grid; grid-template-columns: minmax(150px, 236px) 1fr; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.score-labels { margin: 0; padding: 30px 0 8px; list-style: none; border-right: 1px solid var(--rule); }
.score-labels li { height: var(--row); line-height: var(--row); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.score-labels a { text-decoration: none; color: var(--graphite); display: block; }
.score-labels li.hot a, .score-labels a:hover { color: var(--ink); font-weight: 500; }
.score-labels li.gone a { text-decoration: line-through; text-decoration-color: var(--del); }
.score-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.score svg { display: block; }
.score .staff { stroke: var(--staff); stroke-width: 1; }
.score .life { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.score .tick { fill: var(--graphite); font: 500 11px var(--sans); }
.score .tickline { stroke: var(--rule); }
.score .colhit { fill: transparent; cursor: pointer; }
.score .colhit:hover, .score .colhit.on { fill: var(--hover); }
.score .rowband { fill: var(--hover); opacity: 0; }
.score .rowband.on { opacity: 1; }
.score .n { cursor: pointer; }
.score .bar { fill: var(--graphite); opacity: .45; }
.m-add { fill: var(--add); }
.m-mod { fill: var(--mod); }
.m-other { fill: none; stroke: var(--mod); stroke-width: 1.3; }
.m-del { stroke: var(--del); stroke-width: 2; }
.m-ren { fill: var(--fm); }
.m-fm { fill: none; stroke: var(--fm); stroke-width: 1.6; }

.tip {
  position: fixed; z-index: 10; pointer-events: none; max-width: 320px;
  background: var(--ink); color: var(--paper); padding: 8px 11px; border-radius: 6px;
  font-size: 13px; line-height: 1.4; box-shadow: 0 6px 20px rgb(0 0 0 / .18);
}
.tip b { font-weight: 600; }
.tip .mono { font-size: 12px; }
.tip p { margin: 2px 0 0; opacity: .8; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 0 28px; margin: 8px 0 0; border-bottom: 1px solid var(--rule); }
.tabs a { padding: 10px 0; text-decoration: none; color: var(--graphite); font-weight: 600; font-size: 17px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current] { color: var(--ink); border-color: var(--ink); }
.tabs .count { font-weight: 400; color: var(--faint); margin-left: 4px; }

/* Changes ledger */
.ledger { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 116px 1fr; gap: 0 28px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.entry time { color: var(--graphite); font-size: 14px; padding-top: 3px; }
.entry h3 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry .by { color: var(--graphite); font-size: 14px; margin: 2px 0 10px; }
@media (max-width: 640px) { .score { grid-template-columns: 124px 1fr; } .score-labels li { font-size: 10.5px; padding-right: 8px; } .hero h1 { margin-bottom: 16px; } .lede { font-size: 18px; } }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; } .entry time { padding: 0 0 4px; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 9px 3px; border-radius: 4px; background: var(--sheet); border: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; text-decoration: none; }
.chip:hover { border-color: var(--graphite); }
.chip .k { width: 7px; height: 7px; border-radius: 50%; background: var(--mod); align-self: center; flex: none; }
.chip.added .k { background: var(--add); border-radius: 1px; }
.chip.removed .k { background: var(--del); }
.chip.renamed .k { background: var(--fm); }
.chip.other .k { background: none; border: 1.3px solid var(--mod); }
.chip .fmn { color: var(--fm); font-family: var(--sans); font-size: 12px; font-weight: 600; }
.pm { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.pm .p { color: var(--add); }
.pm .m { color: var(--del); }
.more { margin-top: 8px; background: none; border: 0; padding: 2px 0; color: var(--mod); font-weight: 600; cursor: pointer; font-size: 14px; }
.more:hover { text-decoration: underline; }

/* Skills index */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 18px 0; }
.search { flex: 1 1 260px; max-width: 420px; padding: 9px 12px; border: 1px solid var(--rule); background: var(--sheet); border-radius: 6px; font: inherit; color: inherit; }
.search::placeholder { color: var(--faint); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; color: var(--graphite); font-size: 14px; font-weight: 500; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.toolbar .shown { color: var(--graphite); font-size: 14px; margin-left: auto; }

.skills { list-style: none; margin: 0; padding: 0; }
.skills li { display: grid; grid-template-columns: minmax(180px, 280px) 1fr 140px; gap: 4px 28px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.skills .nm { font-family: var(--mono); font-size: 14.5px; font-weight: 500; text-decoration: none; word-break: break-word; }
.skills .nm:hover { text-decoration: underline; }
.skills .ds { margin: 0; color: var(--graphite); font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 72ch; }
.skills .when { color: var(--graphite); font-size: 13.5px; text-align: right; }
.skills .when b { display: block; color: var(--ink); font-weight: 500; }
.skills li.gone .nm { text-decoration: line-through; text-decoration-color: var(--del); }
@media (max-width: 760px) { .skills li { grid-template-columns: 1fr; } .skills .when { text-align: left; } }

/* Frontmatter view */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 24px 0 8px; padding: 0; list-style: none; }
.fields li { padding: 12px 14px; background: var(--fm-wash); border-radius: 6px; }
.fields code { font-weight: 500; font-size: 14px; }
.fields .used { color: var(--graphite); font-size: 14px; margin-top: 4px; }
.fields .meter { height: 4px; background: rgb(0 0 0 / .08); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.fields .meter i { display: block; height: 100%; background: var(--fm); }
.tablewrap { overflow-x: auto; margin: 18px 0 0; }
table.fm { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.fm th, table.fm td { text-align: left; padding: 7px 14px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.fm th { font-weight: 600; color: var(--graphite); position: sticky; top: 0; background: var(--paper); white-space: nowrap; }
table.fm th code { color: var(--fm); }
table.fm td:first-child a { font-family: var(--mono); font-size: 13px; text-decoration: none; white-space: nowrap; }
table.fm td.v { font-family: var(--mono); font-size: 12px; max-width: 260px; }
table.fm td.v span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.fm td.none { color: var(--faint); }
table.fm td.d { color: var(--graphite); max-width: 420px; }

/* Skill page --------------------------------------------------------- */
.crumb { margin: 28px 0 0; font-size: 15px; color: var(--graphite); }
.skillhead { padding: 10px 0 26px; border-bottom: 2px solid var(--ink); }
.skillhead h1 { font-family: var(--mono); font-weight: 500; font-size: clamp(34px, 6vw, 68px); letter-spacing: -.04em; line-height: 1; margin: 0 0 18px; word-break: break-word; }
.skillhead .desc { font-size: 20px; line-height: 1.45; max-width: 60ch; margin: 0 0 18px; }
.skillhead .facts { color: var(--graphite); font-size: 15px; margin: 0; max-width: 70ch; }
.gone-note { color: var(--del); font-weight: 600; }

.fmcard { margin: 0 0 20px; padding: 12px 16px; background: var(--fm-wash); border-radius: 6px; display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; font-family: var(--mono); font-size: 13px; max-width: 860px; }
.fmcard dt { color: var(--fm); font-weight: 500; }
.fmcard dd { margin: 0; word-break: break-word; white-space: pre-wrap; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-top: 28px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.rail h2, .reader h2 { font-size: 15px; font-weight: 600; color: var(--graphite); margin: 0 0 10px; }
.history { list-style: none; margin: 0; padding: 0; position: relative; }
.history::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--staff); }
.history li { position: relative; padding-left: 26px; }
.history .dot { position: absolute; left: 1px; top: 13px; width: 11px; height: 11px; border-radius: 50%; background: var(--mod); box-shadow: 0 0 0 3px var(--paper); }
.history .dot.added { background: var(--add); border-radius: 2px; }
.history .dot.other { background: var(--paper); border: 1.5px solid var(--mod); }
.history .dot.removed { background: var(--del); }
.history .dot.renamed { background: var(--fm); }
.history a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.history a:hover { background: var(--hover); }
.history a[aria-current] { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.history .d { font-size: 13.5px; color: var(--graphite); display: flex; gap: 10px; justify-content: space-between; }
.history .s { font-size: 14.5px; line-height: 1.35; margin-top: 1px; display: block; }
.history .f { font-size: 12.5px; color: var(--fm); font-weight: 600; margin-top: 3px; display: block; }
.history .o { font-size: 12.5px; color: var(--graphite); margin-top: 3px; display: block; font-family: var(--mono); }

.reader-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.reader-top h2 { margin: 0; color: var(--ink); font-size: 18px; }
.reader-top h2 small { display: block; color: var(--graphite); font-weight: 400; font-size: 14px; margin-top: 2px; }

.fmchanges { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--fm); background: var(--fm-wash); border-radius: 0 6px 6px 0; font-size: 14px; }
.fmchanges h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.fmchanges dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.fmchanges dt { font-family: var(--mono); font-size: 12.5px; color: var(--fm); font-weight: 500; }
.fmchanges dd { margin: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-word; }
.fmchanges del { color: var(--del); text-decoration: line-through; }
.fmchanges ins { color: var(--add); text-decoration: none; }

.doc { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.doc pre { margin: 0; min-width: 0; padding: 14px 0; overflow-x: auto; font: 13px/1.6 var(--mono); tab-size: 2; }
.doc .ln { display: grid; grid-template-columns: 60px 1fr; padding: 0 18px 0 0; white-space: pre-wrap; word-break: break-word; }
.doc .ln::before { content: attr(data-n); padding-right: 14px; text-align: right; color: var(--faint); user-select: none; font-variant-numeric: tabular-nums; }
.doc .ln.h { font-weight: 500; color: var(--ink); }
.doc .ln.fmline { background: var(--fm-wash); }
.doc .ln.fmline.key::first-line { color: var(--ink); }
.doc .ln.add { background: var(--add-wash); }
.doc .ln.del { background: var(--del-wash); }
.doc .ln.add::before, .doc .ln.del::before { color: var(--ink); }
.doc .ln.add::after, .doc .ln.del::after { content: none; }
.doc .gap { display: block; padding: 4px 0 4px 60px; color: var(--faint); font-family: var(--sans); font-size: 13px; border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule); margin: 6px 0; }
.doc .nochange { padding: 18px; color: var(--graphite); font-family: var(--sans); font-size: 15px; margin: 0; }

.files { list-style: none; margin: 8px 0 0; padding: 0; font-family: var(--mono); font-size: 12.5px; color: var(--graphite); }
.files li { padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; }
.filesec { margin-top: 30px; }

/* Commit page */
.commithead { padding: 8px 0 24px; border-bottom: 2px solid var(--ink); }
.commithead h1 { font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -.03em; line-height: 1.08; margin: 0 0 12px; font-weight: 800; max-width: 26ch; }
.commithead p { margin: 0; color: var(--graphite); }
.cskill { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.cskill h2 { margin: 0 0 4px; font-family: var(--mono); font-weight: 500; font-size: 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.cskill h2 a { text-decoration: none; }
.cskill h2 a:hover { text-decoration: underline; }
.cskill .what { color: var(--graphite); font-size: 14.5px; margin: 0 0 12px; }
.kind { font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 4px; }
.kind.added { color: var(--add); background: var(--add-wash); }
.kind.removed { color: var(--del); background: var(--del-wash); }
.kind.modified { color: var(--mod); background: var(--hover); }
.kind.renamed { color: var(--fm); background: var(--fm-wash); }

.foot { padding-top: 56px; padding-bottom: 40px; color: var(--graphite); font-size: 14px; }
.foot p { margin: 0; max-width: 70ch; }

@media (prefers-reduced-motion: no-preference) {
  .score .n { transition: r .15s; }
  .score.enter .n { animation: land .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--c) * 14ms); }
  @keyframes land { from { opacity: 0; transform: translateY(-6px); } }
}

/* Discovery: cards, home, reading ------------------------------------- */
.legend { margin: 22px 0 18px; }
.seg small { font-weight: 400; opacity: .65; margin-left: 2px; }
.seg a { padding: 7px 12px; color: var(--graphite); font-size: 14px; font-weight: 500; text-decoration: none; }
.seg a + a { border-left: 1px solid var(--rule); }
.seg a[aria-current] { background: var(--ink); color: var(--paper); }
.toolbar .seg { flex-wrap: wrap; }
.pick { padding: 7px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: inherit; font: inherit; font-size: 14px; max-width: min(100%, 280px); }
.check { font-size: 14px; color: var(--graphite); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
/* Each card spans three shared row tracks (text, frontmatter, history) so
   the bands line up across a row whatever the description length. */
.card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.card:hover { border-color: var(--graphite); }
.card-main { display: block; min-width: 0; padding: 18px 18px 14px; text-decoration: none; flex: 1; }
.card h3 { margin: 0 0 2px; font: 500 17px/1.3 var(--mono); letter-spacing: -.02em; word-break: break-word; }
.card-main:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.card .folder { display: block; font-size: 13px; color: var(--faint); margin-bottom: 2px; }
.card-main p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--graphite); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.card.gone h3 { text-decoration: line-through; text-decoration-color: var(--del); }
.card-fm { margin: 0; padding: 0 18px 12px; min-width: 0; font: 12px/1.5 var(--mono); color: var(--graphite); }
.card-fm:empty { padding: 0; }
.card-fm div { display: flex; gap: 6px; min-width: 0; }
.card-fm dt { color: var(--faint); flex: none; }
.card-fm dt::after { content: ':'; }
.card-fm dd { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { min-width: 0; padding: 14px 18px 14px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--graphite); }
.life { position: relative; height: 12px; margin: 0 6px 10px; }
.life::before { content: ''; position: absolute; left: -6px; right: -6px; top: 50%; border-top: 1px solid var(--staff); }
.life i { position: absolute; right: -6px; top: 50%; border-top: 1px solid var(--ink); opacity: .5; }
.life .d { position: absolute; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%; background: var(--mod); }
.life .d.added { background: var(--add); border-radius: 1px; }
.life .d.removed { background: var(--del); }
.life .d.fm { box-shadow: 0 0 0 1.5px var(--sheet), 0 0 0 3px var(--fm); }
.life .d.other { background: var(--sheet); border: 1.3px solid var(--mod); }
.life .d:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.card .last { display: flex; justify-content: space-between; gap: 10px; text-decoration: none; color: var(--ink); line-height: 1.4; }
.card .last:hover span:first-child { text-decoration: underline; }
.card .count { display: block; margin-top: 2px; color: var(--faint); font-size: 13px; }
.cards .nomatch { grid-column: 1 / -1; padding: 40px 0; color: var(--graphite); }

.owner { margin: 0 0 6px; font-size: 19px; color: var(--graphite); font-weight: 500; }
.owner a { text-decoration: none; }
.owner a:hover { text-decoration: underline; }
.hero h1.long { font-size: clamp(40px, 6.4vw, 92px); line-height: .92; letter-spacing: -.045em; overflow-wrap: anywhere; }
.authors { border-top: 2px solid var(--ink); }
.author { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 0 28px; border-bottom: 1px solid var(--rule); }
.author > h2 { margin: 0; padding: 22px 0; font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: anywhere; }
.collections { list-style: none; margin: 0; padding: 0; }
.collections li + li { border-top: 1px solid var(--rule); }
.collections a { display: grid; grid-template-columns: minmax(180px, 1.4fr) 1fr 1fr; gap: 4px 24px; align-items: baseline; padding: 24px 0 22px; text-decoration: none; }
.collections a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.collections h3 { margin: 0; font: 500 20px/1.2 var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
.collections p { margin: 0; color: var(--graphite); }
@media (max-width: 760px) { .author { grid-template-columns: 1fr; } .author > h2 { padding-bottom: 0; } .collections a { grid-template-columns: 1fr; padding-top: 14px; } }

.plugins { list-style: none; margin: 0; padding: 0; }
.plugins > li { display: grid; grid-template-columns: minmax(240px, 400px) 1fr; gap: 12px 40px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.plugin-head h3 { margin: 0 0 6px; font: 500 21px/1.2 var(--mono); letter-spacing: -.02em; }
.plugin-head h3 a { text-decoration: none; }
.plugin-head h3 a:hover { text-decoration: underline; }
.plugin-head h3 small { font: 400 13px var(--sans); color: var(--faint); margin-left: 6px; }
.plugin-head p { margin: 0 0 8px; color: var(--graphite); font-size: 15px; line-height: 1.45; }
.plugin-head .meta { font-size: 13.5px; }
.plugin-skills { list-style: none; margin: 0; padding: 0; }
.plugin-skills a { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 2px 18px; padding: 7px 0; text-decoration: none; border-top: 1px solid var(--rule); }
.plugin-skills li:first-child a { border-top: 0; padding-top: 2px; }
.plugin-skills b { font: 500 14px/1.45 var(--mono); overflow-wrap: anywhere; }
.plugin-skills a:hover b { text-decoration: underline; }
.plugin-skills span { color: var(--graphite); font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) { .plugins > li { grid-template-columns: 1fr; } .plugin-skills a { grid-template-columns: 1fr; } }

.viewseg { margin-bottom: 22px; }
.backline { margin: -8px 0 18px; font-size: 14.5px; }
.asof { margin: 0 0 12px; font-size: 18px; }
.chg { padding: 0 0 30px; margin: 0 0 30px; border-bottom: 1px solid var(--rule); }
.chg:last-child { border-bottom: 0; }
.chg h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; display: flex; gap: 12px; align-items: baseline; }
.chg-sub { margin: 4px 0 14px; color: var(--graphite); font-size: 15px; max-width: 70ch; }

.prose { max-width: 72ch; font-size: 17px; line-height: 1.6; overflow-wrap: break-word; }
.reader .prose > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h1 { font-size: 32px; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 18px; font-weight: 800; }
.reader .prose h2 { color: var(--ink); font-size: 24px; letter-spacing: -.02em; line-height: 1.2; margin: 40px 0 12px; font-weight: 700; padding-top: 18px; border-top: 1px solid var(--rule); }
.prose h3 { font-size: 19px; margin: 30px 0 8px; font-weight: 700; }
.prose h4, .prose h5, .prose h6 { font-size: 17px; margin: 24px 0 6px; font-weight: 700; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li > p { margin-bottom: 8px; }
.prose a { text-decoration-color: var(--mod); color: var(--mod); }
.prose code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font-size: .86em; }
.prose pre { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote { border-left: 3px solid var(--rule); padding-left: 16px; color: var(--graphite); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 7px 14px 7px 0; text-align: left; vertical-align: top; }
.prose img { max-width: 100%; height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }
.files a { text-decoration: none; }
.files a:hover { text-decoration: underline; }
.history .s { font-weight: 500; }
.history .o { font-family: var(--sans); font-size: 13px; }

.card { position: relative; overflow: visible; }
.card.is-new .card-main h3 { padding-right: 52px; }
.sticker { position: absolute; top: -9px; right: 14px; z-index: 1; padding: 3px 10px 4px; background: var(--add); color: var(--paper); font: 700 13px/1.2 var(--sans); letter-spacing: .01em; border-radius: 3px; transform: rotate(4deg); box-shadow: 0 2px 0 rgb(0 0 0 / .18); }

/* Word-level diffs: a rewritten line shows once, old words struck out in
   red and new words in green. */
.doc .ln.mix { background: var(--hover); }
.doc .ln.mix::before { content: '~' attr(data-n); color: var(--ink); }
.doc .ln del { background: var(--del-mark); text-decoration: line-through; text-decoration-color: var(--del); border-radius: 2px; padding: 1px 0; color: inherit; }
.doc .ln ins { background: var(--add-mark); text-decoration: none; border-radius: 2px; padding: 1px 0; color: inherit; }
.skillhead h1.long { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; }

/* Collection picker (phones) */
.srcpick { display: none; margin-left: auto; min-width: 0; max-width: 62vw; padding: 7px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: inherit; font: 500 14px var(--sans); text-overflow: ellipsis; }

@media (max-width: 760px) {
  .masthead { gap: 12px; padding-top: 12px; padding-bottom: 12px; position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .sources { display: none; }
  .srcpick { display: block; }

  .hero { padding: 22px 0 18px; }
  .hero h1 { font-size: clamp(52px, 17vw, 96px); margin-bottom: 14px; }
  .hero h1.long { font-size: clamp(30px, 9.4vw, 60px); line-height: .98; }
  .owner { font-size: 16px; }
  .lede { font-size: 17px; line-height: 1.45; }

  /* Tabs and filter rows scroll sideways instead of stacking. */
  .tabs { flex-wrap: nowrap; overflow-x: auto; gap: 0 22px; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; font-size: 16px; }
  .toolbar { gap: 10px; padding: 14px 0; }
  .toolbar .search { flex: 1 1 100%; max-width: none; font-size: 16px; }
  .toolbar .seg { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolbar .seg::-webkit-scrollbar { display: none; }
  .toolbar .seg button { white-space: nowrap; padding: 9px 12px; }
  .pick { flex: 1 1 40%; min-width: 130px; max-width: none; padding: 9px 10px; font-size: 15px; }
  .toolbar .shown { margin-left: 0; }

  .cards { grid-template-columns: 1fr; gap: 14px; }
  .card-main { padding: 16px 16px 12px; }
  .card-main p { -webkit-line-clamp: 4; }
  .card-fm { padding: 0 16px 10px; }
  .card-foot { padding: 12px 16px; }
  .sticker { right: 10px; }

  .crumb { margin-top: 16px; }
  .skillhead { padding-bottom: 18px; }
  .skillhead h1 { font-size: clamp(26px, 8.4vw, 44px); line-height: 1.08; letter-spacing: -.03em; overflow-wrap: anywhere; margin-bottom: 12px; }
  .skillhead .desc { font-size: 17px; margin-bottom: 14px; }
  .fmcard { grid-template-columns: 1fr; gap: 0; padding: 10px 12px; font-size: 12.5px; }
  .fmcard dd + dt { margin-top: 8px; }
  .skillhead h1.long { font-size: clamp(20px, 6.2vw, 30px); }
  .split { padding-top: 18px; gap: 28px; }
  .viewseg { display: flex; width: 100%; margin-bottom: 18px; }
  .viewseg a { flex: 1 1 auto; min-width: 0; text-align: center; padding: 9px 4px; white-space: nowrap; font-size: 14px; }
  .prose { font-size: 16.5px; }
  .prose h1 { font-size: 26px; }
  .prose h2 { font-size: 21px; margin-top: 30px; }
  .prose pre { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; }

  /* Diffs and source run edge to edge with a slim gutter. */
  .doc { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .doc pre { font-size: 12px; line-height: 1.55; padding: 10px 0; }
  .doc .ln { grid-template-columns: 40px 1fr; padding-right: 12px; }
  .doc .ln::before { padding-right: 8px; font-size: 10.5px; }
  .doc .gap { padding-left: 40px; }
  .doc .nochange { padding: 14px 16px; }
  .chg h3 { font-size: 18px; flex-wrap: wrap; }
  .fmchanges { padding: 10px 12px; }
  .fmchanges dl { grid-template-columns: 1fr; gap: 2px; }
  .fmchanges dd + dt { margin-top: 6px; }

  .commithead h1 { font-size: 26px; }
  .cskill h2 { font-size: 17px; overflow-wrap: anywhere; }
  .plugins > li { padding: 20px 0; }
  .foot { padding-top: 36px; }
}
@media (max-width: 760px) { .srcpick { max-width: 38vw; } .srcpick + .setlink { margin-left: 0; } }

/* Sets ----------------------------------------------------------------- */
.setlink { margin-left: auto; flex: none; padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--graphite); white-space: nowrap; }
.setlink b { font: 500 13px var(--mono); margin-left: 4px; }
.setlink.has { border-color: var(--ink); color: var(--ink); }
.setlink:hover { background: var(--hover); }
.pickbtn { border: 1px solid var(--rule); background: var(--sheet); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); white-space: nowrap; }
.pickbtn:hover { border-color: var(--ink); }
.pickbtn[aria-pressed='true'] { background: var(--add); border-color: var(--add); color: var(--paper); }
.card .pickbtn { position: absolute; right: 14px; bottom: 12px; }
.card .count { padding-right: 104px; }
.skillhead .pickbtn { margin-top: 16px; font-size: 14px; padding: 6px 16px; }
.setpage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: start; border-top: 2px solid var(--ink); padding-top: 24px; }
.setgroup + .setgroup { margin-top: 28px; }
.setgroup h2, .setuse h2 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.setuse h3 { font-size: 15px; font-weight: 700; margin: 24px 0 6px; }
.setitems { list-style: none; margin: 0; padding: 0; }
.setitems li { display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--rule); }
.setitems a { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 2px 18px; padding: 8px 0; text-decoration: none; }
.setitems b { font: 500 14px/1.45 var(--mono); overflow-wrap: anywhere; }
.setitems a:hover b { text-decoration: underline; }
.setitems span { color: var(--graphite); font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.setitems .gone b { text-decoration: line-through; text-decoration-color: var(--del); }
.drop { flex: none; border: 0; background: none; padding: 2px 0; font-size: 13.5px; color: var(--graphite); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.drop:hover { color: var(--del); }
.setnote { color: var(--graphite); font-size: 15px; line-height: 1.5; margin: 0 0 10px; max-width: 60ch; }
.seterr { color: var(--del); font-size: 15px; margin: 0 0 10px; }
.cmd { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; margin: 0 0 12px; }
.cmd pre { margin: 0; padding: 40px 16px 16px; font: 13px/1.7 var(--mono); overflow-x: auto; white-space: pre; }
.cmd .copy { position: absolute; top: 8px; right: 8px; border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; padding: 3px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cmd .copy:hover { border-color: var(--ink); }
.primary { border: 0; background: var(--ink); color: var(--paper); border-radius: 6px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.primary:disabled { opacity: .6; cursor: default; }
@media (max-width: 900px) { .setpage { grid-template-columns: minmax(0, 1fr); gap: 28px; } .setitems a { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .masthead { gap: 12px; } .setlink { padding: 4px 10px; font-size: 14px; } }
.reflist { list-style: none; margin: 0; padding: 0; }
.reflist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--rule); }
.reflist li:first-child { border-top: 0; }
.reflist a { font: 500 13.5px/1.4 var(--mono); overflow-wrap: anywhere; min-width: 0; }
.reflist .pickbtn { padding: 2px 10px; font-size: 12.5px; flex: none; }
.setgroup.needs { margin-top: 36px; }
.setitems li { align-items: center; }
.plugin-head .pickbtn { margin-top: 10px; }
.setitems .offer b { color: var(--graphite); }
.setitems .offer b::before { content: 'Whole plugin: '; font-family: var(--sans); font-weight: 600; }
.setitems .offer span { display: block; -webkit-line-clamp: unset; }
