/* Site look: warm paper and ember, serif headings, side menu for projects. */
:root {
  --bg: #f5f1ea; --panel: #fffdf9; --panel2: #faf6ef; --ink: #23201b; --muted: #746b5f; --line: #e3dbcf;
  --accent: #c2410c; --accent-ink: #fff8f0; --accent-soft: #fbe6d4; --link: #9a3412;
  --good: #2f7a4b; --good-soft: #e2f1e7; --bad: #b42318; --bad-soft: #fbe5e2; --warn: #a16207; --warn-soft: #fbf0d0;
  --code-bg: #f1ece3; --add: #e5f3e8; --add-s: #c6e7cf; --del: #fbe9e6; --del-s: #f3cbc5; --hunk: #efe8f6;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 2px 10px rgba(60, 40, 20, .04);
  --r: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120f; --panel: #1c1915; --panel2: #211e19; --ink: #ece5d9; --muted: #a39887; --line: #332e27;
    --accent: #ef8a4c; --accent-ink: #1a0f06; --accent-soft: #3a2416; --link: #f4a46f;
    --good: #6cc391; --good-soft: #17301f; --bad: #f07a6e; --bad-soft: #3a1a16; --warn: #e3b552; --warn-soft: #33290f;
    --code-bg: #24201b; --add: #16291c; --add-s: #1f4229; --del: #33191a; --del-s: #552426; --hunk: #2a2433;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14120f; --panel: #1c1915; --panel2: #211e19; --ink: #ece5d9; --muted: #a39887; --line: #332e27;
  --accent: #ef8a4c; --accent-ink: #1a0f06; --accent-soft: #3a2416; --link: #f4a46f;
  --good: #6cc391; --good-soft: #17301f; --bad: #f07a6e; --bad-soft: #3a1a16; --warn: #e3b552; --warn-soft: #33290f;
  --code-bg: #24201b; --add: #16291c; --add-s: #1f4229; --del: #33191a; --del-s: #552426; --hunk: #2a2433;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
code, pre, .sha { font-family: var(--mono); font-size: 13px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.hidden { display: none !important; }
.center { text-align: center; }
.i { vertical-align: -3px; flex: none; }

/* top bar */
.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.brand:hover { text-decoration: none; }
.find { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--muted); }
.find input { border: 0; background: none; outline: none; color: var(--ink); font: inherit; width: 100%; padding: 0; }
.me { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ghost { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 500 14px/1.3 var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.on { background: var(--accent-soft); border-color: var(--accent); }
.btn.off { opacity: .45; pointer-events: none; }
.btn .count { background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; font-size: 12px; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { font-family: var(--mono); font-size: 13.5px; resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.form label .muted { font-weight: 400; }
.form label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.form.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form.inline input { width: auto; flex: 1; min-width: 180px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 10px; margin: 0; }
legend { font-weight: 600; padding: 0 6px; }
.form > .btn { justify-self: start; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.copyrow { display: flex; gap: 6px; }
.copyrow input { font-family: var(--mono); font-size: 12.5px; padding: 6px 8px; }

/* menus */
details.picker, details.usermenu { position: relative; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.picker > summary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 13.5px; font-weight: 500; }
.picker > summary span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; max-height: 360px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 30px rgba(0,0,0,.15); padding: 6px; }
.menu.right { left: auto; right: 0; }
.menu a, .menu .linkish { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink); font-size: 14px; width: 100%; text-align: left; }
.menu a:hover, .menu .linkish:hover { background: var(--accent-soft); text-decoration: none; }
.menu a.on { font-weight: 700; color: var(--accent); }
.menu-h { font-size: 12px; color: var(--muted); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .04em; }

/* avatar */
.av { width: var(--s); height: var(--s); border-radius: 30%; display: inline-grid; place-items: center; font-weight: 700; font-size: calc(var(--s) * .5);
  background: hsl(var(--h) 55% 85%); color: hsl(var(--h) 45% 28%); vertical-align: middle; flex: none; }
:root[data-theme="dark"] .av { background: hsl(var(--h) 35% 28%); color: hsl(var(--h) 60% 85%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { background: hsl(var(--h) 35% 28%); color: hsl(var(--h) 60% 85%); } }
.who { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }

/* flash */
.flash { max-width: 1320px; margin: 12px auto 0; padding: 10px 16px; border-radius: var(--r); background: var(--good-soft); color: var(--good); border: 1px solid var(--good); width: calc(100% - 32px); }
.flash.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.flash.inline { width: auto; margin: 0 0 12px; }

/* page */
.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
.narrow { max-width: 560px; margin: 20px auto; }
.narrow.wide-ish { max-width: 760px; }
.lede { font-size: 1.1rem; color: var(--muted); }
.big-code { font-family: var(--serif); font-size: 5rem; color: var(--accent); margin: 0; line-height: 1; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 28px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.hero h1 { font-size: 2.6rem; margin: 0; }
.hero .lede { margin: 6px 0 0; }
.section-h { font-size: 1.2rem; margin: 26px 0 12px; display: flex; gap: 8px; align-items: baseline; }
.empty { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 30px; text-align: center; color: var(--muted); background: var(--panel2); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.2rem; }
.dangerzone { border-color: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); background: var(--panel2); font-weight: 500; }
.pill.good { color: var(--good); border-color: var(--good); background: var(--good-soft); }
.pill.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.profile { display: flex; gap: 20px; align-items: center; margin: 10px 0 20px; }
.bigsearch { display: flex; gap: 8px; margin: 10px 0 20px; }

/* project cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--accent); }
.card-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.card-desc { color: var(--muted); margin: 0; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; margin-top: auto; }
.tagchip { display: inline-flex; gap: 5px; align-items: center; font-family: var(--mono); font-size: 12.5px; background: var(--accent-soft); color: var(--link); padding: 2px 8px; border-radius: 6px; }

/* repository frame */
.rhead { background: var(--panel); border-bottom: 1px solid var(--line); }
.rhead-in { max-width: 1320px; margin: 0 auto; padding: 22px 16px 18px; display: flex; align-items: end; gap: 20px; flex-wrap: wrap; }
.rtitle { flex: 1; min-width: 0; }
.rtitle .owner { margin: 0 0 2px; display: flex; gap: 10px; align-items: center; }
.rtitle .owner a { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.rtitle h1 { margin: 0; font-size: 2.1rem; overflow-wrap: anywhere; }
.rtitle h1 a { color: var(--ink); }
.ractions { display: flex; gap: 8px; }
.rbody { width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 16px 48px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; flex: 1; }
.rnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 74px; align-self: start; }
.rnav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.rnav a:hover { background: var(--panel); text-decoration: none; }
.rnav a.on { background: var(--accent-soft); color: var(--link); box-shadow: inset 3px 0 0 var(--accent); }
.rnav em { margin-left: auto; font-style: normal; font-size: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); }
.rmain { min-width: 0; }
.split.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
.side-col { display: flex; flex-direction: column; gap: 18px; }
.main-col, .side-col { min-width: 0; }
.about h3 { font-size: 1rem; margin-bottom: 6px; }
.about p { margin: 0 0 8px; }
.facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.relcard { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--ink); margin-bottom: 8px; }
.clone label { font-weight: 600; font-size: 13.5px; display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }

/* toolbar, crumbs */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.inline-h { margin: 0; font-size: 1.3rem; }
.crumbs { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.crumbs .sep { color: var(--muted); margin: 0 4px; }
.filter { max-width: 420px; }

/* last commit strip and file list */
.lastc { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--panel2); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; padding: 10px 14px; font-size: 14px; }
.lastc .subj { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.lastc + .files, .lastc + .blob { border-top-left-radius: 0; border-top-right-radius: 0; }
.sha { color: var(--muted); }
.files { list-style: none; margin: 0 0 20px; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.files li { border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.files a, .files .sub { display: flex; gap: 10px; align-items: center; padding: 8px 14px; color: var(--ink); overflow-wrap: anywhere; }
.files a:hover { background: var(--panel2); text-decoration: none; }
.files a.dir .i { color: var(--accent); }
.files .i { color: var(--muted); }

/* readme and markdown */
.readme { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.readme > header { padding: 10px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.readme .md, .md-wrap .md { padding: 22px 28px; }
.md { overflow-wrap: anywhere; }
.md-src, .plain { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; margin: 0; }
.plain { padding: 16px; }
.md h1, .md h2 { border-bottom: 1px solid var(--line); padding-bottom: .25em; margin-top: 1.2em; }
.md h1:first-child, .md h2:first-child { margin-top: 0; }
.md img { max-width: 100%; }
.md pre { background: var(--code-bg); padding: 12px 14px; border-radius: 8px; overflow: auto; }
.md :not(pre) > code { background: var(--code-bg); padding: 1px 5px; border-radius: 5px; font-size: .88em; }
.md blockquote { margin: 0 0 1em; padding: 2px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.md table { border-collapse: collapse; margin: 0 0 1em; display: block; overflow: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 10px; }
.md th { background: var(--panel2); }
.md hr { border: 0; border-top: 1px solid var(--line); }
.md > :last-child { margin-bottom: 0; }

/* single file */
.blob { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.blob > header { display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.code { display: flex; overflow: auto; font-size: 13px; line-height: 20px; }
.code pre { margin: 0; padding: 12px 0; line-height: 20px; }
.gutter { text-align: right; user-select: none; padding: 12px 10px !important; border-right: 1px solid var(--line); background: var(--panel2); position: sticky; left: 0; }
.gutter a { color: var(--muted); }
.code pre, .code code { font: 13px/20px var(--mono); }
.gutter a:target, .gutter a.hit { color: var(--accent); font-weight: 700; }
.src { flex: 1; padding: 12px 16px !important; }
.src code { font-size: 13px; background: none !important; padding: 0 !important; }
.imgview { padding: 24px; text-align: center; background: repeating-conic-gradient(var(--panel2) 0 25%, var(--panel) 0 50%) 0 0 / 20px 20px; }
.imgview img { max-width: 100%; }
.dnote { padding: 16px; color: var(--muted); margin: 0; }

/* commits */
.day { font-size: .95rem; color: var(--muted); font-family: var(--sans); font-weight: 600; margin: 18px 0 8px; display: flex; gap: 6px; align-items: center; }
.commits { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.commits li { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.commits li:first-child { border-top: 0; }
.c-main { flex: 1; min-width: 0; }
.c-main .subj { color: var(--ink); font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; gap: 8px; justify-content: center; margin: 20px 0; }
.commit-head { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; }
.cbody { white-space: pre-wrap; margin: 0 0 12px; color: var(--muted); }
.cmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }

/* diffs */
.diffstat { margin: 6px 0 8px; }
.plus { color: var(--good); font-family: var(--mono); font-size: 13px; }
.minus { color: var(--bad); font-family: var(--mono); font-size: 13px; }
.difflist { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13.5px; columns: 2 320px; }
.difflist li { padding: 2px 0; break-inside: avoid; }
.difflist a { color: var(--ink); font-family: var(--mono); font-size: 13px; }
.st { display: inline-block; width: 18px; text-align: center; border-radius: 4px; font: 700 11px/18px var(--mono); }
.st-A { background: var(--good-soft); color: var(--good); }
.st-D { background: var(--bad-soft); color: var(--bad); }
.st-M { background: var(--warn-soft); color: var(--warn); }
.dfile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; overflow: hidden; }
.dfile > header { padding: 8px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.dscroll { overflow-x: auto; }
.dtab { border-collapse: collapse; width: 100%; font: 12.5px/19px var(--mono); }
.dtab td { padding: 0 8px; vertical-align: top; }
.dtab .ln { width: 1%; min-width: 44px; text-align: right; color: var(--muted); user-select: none; border-right: 1px solid var(--line); }
.dtab .tx { white-space: pre; }
.dtab .sg { display: inline-block; width: 14px; user-select: none; color: var(--muted); }
.dtab tr.add { background: var(--add); } .dtab tr.add .ln { background: var(--add-s); }
.dtab tr.del { background: var(--del); } .dtab tr.del .ln { background: var(--del-s); }
.dtab tr.hunk td { background: var(--hunk); color: var(--muted); padding: 4px 12px; }

/* rows: branches, tags, issues */
.rows { list-style: none; padding: 0; margin: 0 0 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.rows li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rows li:first-child { border-top: 0; }
.push-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
form.inline { display: inline; }
.state { display: inline-flex; }
.s-open { color: var(--good); } .s-closed { color: var(--muted); } .s-merged { color: #8250df; }
.ititle { color: var(--ink); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg a { padding: 6px 12px; color: var(--ink); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; border-left: 1px solid var(--line); }
.seg a:first-child { border-left: 0; }
.seg a.on { background: var(--accent-soft); color: var(--link); font-weight: 600; }
.seg a:hover { text-decoration: none; }
.seg em { font-style: normal; font-size: 12px; color: var(--muted); }
.seg.tabs { margin-bottom: 16px; }

/* issue page */
.ihead h2 { font-size: 1.6rem; }
.badge { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 99px; font-weight: 600; font-size: 13.5px; margin-right: 8px; }
.b-open { background: var(--good); color: #fff; } .b-closed { background: var(--muted); color: #fff; } .b-merged { background: #8250df; color: #fff; }
.timeline { list-style: none; margin: 0 0 16px; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-left: -6px; }
.note-h { padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel2); border-radius: var(--r) var(--r) 0 0; display: flex; gap: 8px; align-items: center; }
.note .md { padding: 12px 16px; }
.note > p { padding: 12px 16px; margin: 0; }
.event { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; margin-left: -27px; }
.event .i { background: var(--bg); border-radius: 50%; padding: 2px; width: 20px; height: 20px; }
.mergebox { border: 1px solid var(--good); background: var(--good-soft); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; }
.mergebox.bad { border-color: var(--warn); background: var(--warn-soft); }
.editor { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.editor-tabs { display: flex; gap: 2px; align-items: center; padding: 6px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.editor-tabs button { background: none; border: 0; padding: 5px 12px; border-radius: 6px; font: 500 13.5px var(--sans); color: var(--muted); cursor: pointer; }
.editor-tabs button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.editor-tabs .muted { margin-left: auto; padding-right: 6px; }
.editor textarea { border: 0; border-radius: 0; }
.editor .preview { padding: 12px 16px; min-height: 120px; }
.reply { margin-top: 10px; }
.compare-pick label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.compare-pick select { width: auto; }
.arrow { font-size: 20px; color: var(--muted); }

/* releases */
.release { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.release:first-of-type { border-top: 0; }
.rel-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding-top: 4px; }
.rel-main { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.rel-main > header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rel-main h3 { margin: 0; font-size: 1.4rem; }
.rel-main h3 a { color: var(--ink); }
.assets-h { margin: 18px 0 8px; font-size: 14px; }
.assets { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; }
.assets li { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.assets li:first-child { border-top: 0; }
.assets a { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.tokenbox { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--r); padding: 12px; margin-bottom: 12px; }
pre.cmd { background: var(--code-bg); padding: 14px; border-radius: 8px; overflow: auto; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 18px 16px; display: flex; gap: 18px; justify-content: center; color: var(--muted); font-size: 13px; }

/* code colours (highlight.js classes) */
.hljs-comment, .hljs-quote { color: #8a7f70; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-meta .hljs-keyword { color: #b4321f; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute .hljs-string { color: #3b7a2a; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #a05a00; }
.hljs-title, .hljs-title.function_, .hljs-section { color: #2a5fa8; }
.hljs-built_in, .hljs-type, .hljs-title.class_ { color: #7b3fa0; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-property { color: #96571a; }
.hljs-meta, .hljs-doctag { color: #6b6290; }
.hljs-deletion { color: var(--bad); }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }
:root[data-theme="dark"] .hljs-keyword, :root[data-theme="dark"] .hljs-selector-tag, :root[data-theme="dark"] .hljs-literal { color: #ff8f73; }
:root[data-theme="dark"] .hljs-string, :root[data-theme="dark"] .hljs-regexp { color: #9fd486; }
:root[data-theme="dark"] .hljs-number, :root[data-theme="dark"] .hljs-symbol { color: #f2b66d; }
:root[data-theme="dark"] .hljs-title, :root[data-theme="dark"] .hljs-section { color: #82b4f5; }
:root[data-theme="dark"] .hljs-built_in, :root[data-theme="dark"] .hljs-type { color: #cf9cf0; }
:root[data-theme="dark"] .hljs-attr, :root[data-theme="dark"] .hljs-variable, :root[data-theme="dark"] .hljs-property { color: #e9b07a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hljs-keyword, :root:not([data-theme="light"]) .hljs-literal { color: #ff8f73; }
  :root:not([data-theme="light"]) .hljs-string, :root:not([data-theme="light"]) .hljs-regexp { color: #9fd486; }
  :root:not([data-theme="light"]) .hljs-number { color: #f2b66d; }
  :root:not([data-theme="light"]) .hljs-title, :root:not([data-theme="light"]) .hljs-section { color: #82b4f5; }
  :root:not([data-theme="light"]) .hljs-built_in, :root:not([data-theme="light"]) .hljs-type { color: #cf9cf0; }
  :root:not([data-theme="light"]) .hljs-attr, :root:not([data-theme="light"]) .hljs-variable, :root:not([data-theme="light"]) .hljs-property { color: #e9b07a; }
}

/* narrow screens */
@media (max-width: 1100px) {
  .split.with-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .rbody { grid-template-columns: 1fr; gap: 14px; }
  .rnav { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; }
  .rnav a { white-space: nowrap; }
  .rnav a.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .release { grid-template-columns: 1fr; gap: 8px; }
  .rel-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .row2 { grid-template-columns: 1fr; }
  .find { display: none; }
  .hero h1 { font-size: 2rem; }
  .rtitle h1 { font-size: 1.55rem; overflow-wrap: normal; word-break: break-word; }
  .cards { grid-template-columns: 1fr; }
  .lastc .subj { max-width: 100%; }
  .readme .md, .md-wrap .md { padding: 16px; }
}
