/* Arboretum.
 *
 * Two layers, after Apple's Liquid Glass: content (code, lists, diffs) sits on
 * calm, nearly opaque surfaces so it stays readable; navigation and controls
 * (toolbar, tabs, sidebar, popovers, cards) float above it as translucent
 * glass that picks up the colour behind it. Shapes are capsules and
 * concentric rounded rectangles. Colours and type are the system's.
 */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --blue: #007aff; --green: #34c759; --red: #ff3b30; --orange: #ff9500;
  --purple: #af52de; --teal: #30b0c7; --indigo: #5856d6; --gray: #8e8e93;
  --label: rgba(0, 0, 0, .88); --label2: rgba(60, 60, 67, .66); --label3: rgba(60, 60, 67, .36);
  --separator: rgba(60, 60, 67, .13);
  --fill: rgba(120, 120, 128, .12); --fill-hover: rgba(120, 120, 128, .18);
  --canvas: #f2f2f7;
  --content: rgba(255, 255, 255, .86);
  --glass: rgba(255, 255, 255, .5); --glass-thick: rgba(255, 255, 255, .72);
  --rim: rgba(255, 255, 255, .9); --rim-low: rgba(255, 255, 255, .25);
  --selected: #fff;
  --shadow: 0 8px 32px rgba(0, 0, 0, .09), 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-pop: 0 20px 60px rgba(0, 0, 0, .22), 0 2px 10px rgba(0, 0, 0, .10);
  --blur: blur(28px) saturate(180%);
  --tint-a: rgba(52, 199, 89, .26); --tint-b: rgba(0, 122, 255, .24); --tint-c: rgba(175, 82, 222, .17);
  --hl: rgba(255, 204, 0, .34);
  --add: rgba(52, 199, 89, .16); --del: rgba(255, 59, 48, .13);
  /* Xcode's default light theme */
  --c: #5d6c79; --s: #c41a16; --n: #1c00cf; --k: #9b2393; --t: #0b4f79;
  --r-s: 10px; --r-m: 16px; --r-l: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #0a84ff; --green: #30d158; --red: #ff453a; --orange: #ff9f0a;
    --purple: #bf5af2; --teal: #40c8e0; --indigo: #5e5ce6; --gray: #8e8e93;
    --label: rgba(255, 255, 255, .92); --label2: rgba(235, 235, 245, .62); --label3: rgba(235, 235, 245, .32);
    --separator: rgba(255, 255, 255, .10);
    --fill: rgba(120, 120, 128, .24); --fill-hover: rgba(120, 120, 128, .34);
    --canvas: #000;
    --content: rgba(28, 28, 30, .86);
    --glass: rgba(44, 44, 48, .46); --glass-thick: rgba(44, 44, 48, .72);
    --rim: rgba(255, 255, 255, .28); --rim-low: rgba(255, 255, 255, .05);
    --selected: rgba(255, 255, 255, .16);
    --shadow: 0 8px 32px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-pop: 0 20px 60px rgba(0, 0, 0, .65), 0 2px 10px rgba(0, 0, 0, .4);
    --tint-a: rgba(48, 209, 88, .17); --tint-b: rgba(10, 132, 255, .20); --tint-c: rgba(191, 90, 242, .15);
    --hl: rgba(255, 214, 10, .26);
    --add: rgba(48, 209, 88, .17); --del: rgba(255, 69, 58, .17);
    /* Xcode's default dark theme */
    --c: #7f8c98; --s: #fc6a5d; --n: #d0bf69; --k: #fc5fa3; --t: #5dd8ff;
  }
}

* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--canvas); color: var(--label);
  font-family: var(--font); line-height: 1.47; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* Soft colour behind everything, so the glass has something to pick up. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 55vh at 8% -8%, var(--tint-a), transparent 62%),
    radial-gradient(55vw 55vh at 100% 0%, var(--tint-b), transparent 60%),
    radial-gradient(65vw 60vh at 62% 108%, var(--tint-c), transparent 62%);
}
::selection { background: color-mix(in srgb, var(--blue) 28%, transparent); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .code, .diff { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-family: var(--display); letter-spacing: -.022em; }
h2 { font-size: 1.35rem; font-weight: 700; } h3 { font-size: 1.05rem; font-weight: 600; } h4 { font-size: .95rem; font-weight: 600; }

/* ---------------------------------------------------------------- glass */
header.top, nav.tabs, .card, aside.outline, #pop, .sheet, form.inline, .filebar, .mergenote, .empty pre {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
/* A bright rim along the edge, strongest where light would catch it. */
header.top::before, nav.tabs::before, .card::before, #pop::before, .sheet::before,
form.inline::before, .filebar::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, var(--rim), var(--rim-low) 32%, var(--rim-low) 68%, var(--rim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------------------------------------------------------------- toolbar */
header.top {
  position: sticky; top: 10px; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  margin: 10px auto 0; padding: .45rem .55rem .45rem 1rem;
  width: min(1500px, calc(100% - 24px)); border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 650; font-size: 1.07rem; color: var(--label); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.logo { display: block; border-radius: 7px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
form.search { flex: 1; max-width: 520px; margin: 0 auto; }
form.search input {
  width: 100%; border-radius: 999px; padding: .42rem .9rem .42rem 2.1rem;
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='M13 13l4.5 4.5'/%3E%3C/svg%3E") no-repeat .7rem center / 15px;
}
nav.user { display: flex; gap: .5rem; align-items: center; }
nav.user form { margin: 0; }
a.who { display: flex; align-items: center; gap: .5rem; color: var(--label); font-weight: 500; padding: .15rem .6rem .15rem .15rem; border-radius: 999px; transition: background .2s var(--ease); }
a.who:hover { background: var(--fill); text-decoration: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .82rem; font-weight: 650; background: linear-gradient(160deg, var(--teal), var(--blue) 55%, var(--indigo)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }

/* ---------------------------------------------------------------- controls */
input, select, button, a.pill {
  font: inherit; letter-spacing: inherit; color: var(--label);
  border: none; border-radius: var(--r-s); padding: .45rem .75rem; background: var(--fill);
  transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
input::placeholder { color: var(--label3); }
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: none; box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--blue) 38%, transparent);
}
select { padding-right: 1.9rem; -webkit-appearance: none; appearance: none;
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat right .6rem center / 12px; }
button, a.pill {
  border-radius: 999px; padding: .45rem 1.05rem; cursor: pointer; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 88%, #fff), var(--blue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .12);
}
button:hover, a.pill:hover { filter: brightness(1.06); text-decoration: none; }
button:active, a.pill:active { transform: scale(.97); }
button.quiet { color: var(--label); background: var(--fill); box-shadow: none; font-weight: 500; }
button.quiet:hover { background: var(--fill-hover); filter: none; }
button.link { background: none; box-shadow: none; color: var(--blue); padding: 0; font-weight: 400; border-radius: 4px; }
button.link:hover { text-decoration: underline; filter: none; }

/* ---------------------------------------------------------------- tree title and tabs */
.treebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; width: min(1500px, calc(100% - 24px)); margin: 1.4rem auto 0; padding: 0 .75rem; }
.treebar h1 { font-size: 1.9rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .7rem; }
.treebar h1 a { color: var(--label); }
.treebar h1 a:hover { text-decoration: none; }
nav.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; }
nav.tabs a { position: relative; z-index: 1; padding: .34rem 1rem; border-radius: 999px; color: var(--label2); font-weight: 500; font-size: .93rem; transition: background .25s var(--ease), color .2s; }
nav.tabs a:hover { text-decoration: none; color: var(--label); }
nav.tabs a.active { color: var(--label); font-weight: 600; background: var(--selected); box-shadow: 0 1px 4px rgba(0, 0, 0, .13), inset 0 1px 0 rgba(255, 255, 255, .5); }
.count { margin-left: .45rem; font-size: .76rem; font-weight: 600; background: var(--fill); color: var(--label2); border-radius: 999px; padding: .05rem .45rem; }

main { padding: 1.25rem .75rem 4rem; width: min(1500px, calc(100% - 24px)); margin: 0 auto; }
.narrow { max-width: 540px; margin: 0 auto; }
main.narrow { padding-top: 3rem; }
.sheet { border-radius: var(--r-l); padding: 1.75rem 1.75rem 1.5rem; margin-top: 2.5rem; box-shadow: var(--shadow-pop); }
.sheet h1 { font-size: 1.6rem; font-weight: 700; }
.sheet .logo { margin: 0 0 1rem; border-radius: 13px; }
.sheet form.stack { margin-bottom: 0; }
.sheet form.stack button { align-self: stretch; padding: .6rem; margin-top: .3rem; }
.hero { margin: 1.5rem 0 1.75rem; }
.hero h1 { font-size: 2.3rem; font-weight: 700; margin-bottom: .25rem; }
.hero p { color: var(--label2); max-width: 62ch; margin: 0; font-size: 1.05rem; }

.badge { display: inline-block; font-family: var(--font); font-size: .7rem; font-weight: 600; letter-spacing: 0; padding: .12rem .55rem; border-radius: 999px; background: var(--fill); color: var(--label2); margin-left: .5rem; vertical-align: middle; white-space: nowrap; }
.badge.public { color: color-mix(in srgb, var(--green) 72%, var(--label)); background: color-mix(in srgb, var(--green) 17%, transparent); }
.badge.conflict { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.badge.merged, .badge.old { color: color-mix(in srgb, var(--orange) 78%, var(--label)); background: color-mix(in srgb, var(--orange) 17%, transparent); }
.note, .meta, .empty { color: var(--label2); }
.small { font-size: .85rem; margin-left: .5rem; }
.empty { padding: 1rem 0; }
.empty pre { border-radius: var(--r-m); padding: .8rem 1.1rem; color: var(--label); display: inline-block; margin: .25rem 0 0; }

/* ---------------------------------------------------------------- tree cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 2.25rem; }
.card { display: block; border-radius: var(--r-l); padding: 1.1rem 1.25rem 1rem; color: var(--label); transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s; }
.card:hover { text-decoration: none; transform: translateY(-3px) scale(1.012); background: var(--glass-thick); box-shadow: var(--shadow-pop); }
.card:active { transform: scale(.985); }
.card h2 { font-size: 1.13rem; font-weight: 650; margin-bottom: .3rem; display: flex; align-items: center; }
.card h2::before { content: ""; width: 26px; height: 26px; margin-right: .6rem; flex: none; border-radius: 7px; background: url("/static/logo.svg") center / cover; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.card p { margin: 0 0 .5rem; color: var(--label2); font-size: .92rem; min-height: 1.3em; }
.card p.meta { margin: 0; font-size: .8rem; color: var(--label3); min-height: 0; }

form.inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; padding: 1rem 1.15rem; border-radius: var(--r-l); }
form.inline h2 { width: 100%; margin: 0 0 .2rem; font-size: 1.05rem; }
form.inline input[name="description"] { flex: 1; min-width: 12rem; }
form.stack { display: flex; flex-direction: column; gap: .85rem; margin-bottom: 2rem; }
form.stack label { display: flex; flex-direction: column; gap: .3rem; font-size: .86rem; font-weight: 500; color: var(--label2); }
form.stack input, form.stack select { padding: .55rem .75rem; font-size: 1rem; }
form.stack button { align-self: flex-start; }

nav.crumbs { font-size: .95rem; margin: .1rem 0 .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; }
nav.crumbs a { color: var(--label2); padding: .1rem .35rem; border-radius: 6px; font-weight: 500; }
nav.crumbs a:hover { background: var(--fill); text-decoration: none; color: var(--label); }
nav.crumbs a:last-of-type { color: var(--label); font-weight: 600; }
nav.crumbs .sep { color: var(--label3); }

/* ---------------------------------------------------------------- content surfaces */
table { border-collapse: separate; border-spacing: 0; }
table.listing, table.changes, .codewrap, .filediff, .readme, .hit {
  background: var(--content); border-radius: var(--r-m); box-shadow: 0 0 0 .5px var(--separator), 0 2px 12px rgba(0, 0, 0, .05); overflow: hidden;
}
table.listing, table.changes { width: 100%; }
table.listing td, table.changes td { padding: .5rem .85rem; border-top: .5px solid var(--separator); }
table.listing tr:first-child td, table.changes tr:first-child td { border-top: none; }
table.listing tr, table.changes tr { transition: background .15s; }
table.listing tr:hover, table.changes tr:hover { background: color-mix(in srgb, var(--blue) 7%, transparent); }
td.icon { width: 2.2rem; padding-right: 0 !important; }
.ico { display: block; width: 18px; height: 18px; background: var(--label3);
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 2h6.2L16 6.3V16a2 2 0 0 1-2 2H5.5a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm5.7 1.6V7H14.5z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ico.folder { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 65%, #fff), var(--blue));
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 5.5A2 2 0 0 1 4 3.5h3.6l1.8 1.9H16a2 2 0 0 1 2 2V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.ico.link { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15l10-10M7 5h7v7'/%3E%3C/svg%3E"); }
td.name a { color: var(--label); font-weight: 450; }
td.name a.dir { font-weight: 600; }
td.size, td.time, td.author { color: var(--label2); white-space: nowrap; text-align: right; font-size: .86rem; font-variant-numeric: tabular-nums; }
td.author { text-align: left; }
td.num { width: 5rem; font-family: var(--mono); font-size: .86rem; }
td.msg { width: 60%; }
td.msg a { color: var(--label); font-weight: 500; }

.readme { margin-top: 1.25rem; }
.readme h3 { padding: .6rem 1.1rem; border-bottom: .5px solid var(--separator); margin: 0; font-size: .82rem; font-weight: 600; color: var(--label2); font-family: var(--font); letter-spacing: 0; }
.md { padding: .6rem 1.6rem 1.4rem; max-width: 92ch; overflow-wrap: anywhere; }
.md h1 { font-size: 1.7rem; margin-top: 1rem; } .md h2 { margin-top: 1.5rem; } .md h3 { margin-top: 1.15rem; }
.md pre, .readme > pre { background: var(--fill); border-radius: var(--r-s); padding: .75rem .95rem; overflow-x: auto; }
.readme > pre { margin: 1rem; }
.md code { background: var(--fill); padding: .08rem .35rem; border-radius: 5px; }
.md pre code { background: none; padding: 0; }
.md table { margin: .8rem 0; } .md td, .md th { border-bottom: .5px solid var(--separator); padding: .4rem .7rem; text-align: left; }
.md img { max-width: 100%; }

/* ---------------------------------------------------------------- file view */
.filebar { display: flex; justify-content: space-between; align-items: center; color: var(--label2); font-size: .86rem; padding: .5rem 1rem; border-radius: var(--r-m) var(--r-m) 0 0; box-shadow: none; }
.filebar .actions { display: flex; gap: .4rem; }
.filebar .actions a { padding: .18rem .7rem; border-radius: 999px; background: var(--fill); color: var(--label); font-weight: 500; }
.filebar .actions a:hover { background: var(--fill-hover); text-decoration: none; }
.filebar .badge { margin-left: .75rem; }
.fileview { display: flex; align-items: flex-start; gap: 1rem; }
.filemain { flex: 1; min-width: 0; }
.filemain .codewrap { border-radius: 0 0 var(--r-m) var(--r-m); }
.codewrap { overflow-x: auto; padding: .4rem 0; }
table.code { width: 100%; }
table.code td { padding: 0 .85rem; vertical-align: top; white-space: pre; line-height: 1.6; }
table.code tr { scroll-margin-top: 110px; }
table.code td.ln { width: 1%; min-width: 3.4rem; text-align: right; user-select: none; -webkit-user-select: none; font-variant-numeric: tabular-nums; }
table.code td.ln a { color: var(--label3); }
table.code tr:target td { background: var(--hl); }
table.code td.src { tab-size: 4; }
.code .c { color: var(--c); }
.code .s { color: var(--s); }
.code .n { color: var(--n); }
.code .k { color: var(--k); font-weight: 600; }
.code .t { color: var(--t); }
.codewrap .i, .codewrap .t, .codewrap [data-s] { cursor: pointer; border-radius: 4px; transition: background .15s; }
.codewrap .i:hover, .codewrap .t:hover, .codewrap [data-s]:hover { background: color-mix(in srgb, var(--blue) 16%, transparent); }
.codewrap .same { background: var(--hl); box-shadow: 0 0 0 1.5px var(--hl); }

aside.outline { box-shadow: var(--shadow), inset 0 0 0 1px var(--rim-low), inset 0 1px 0 var(--rim); width: 272px; flex: none; position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; border-radius: var(--r-l); padding: .85rem .55rem .85rem .85rem; font-size: .86rem; }
aside.outline h4 { color: var(--label2); font-family: var(--font); font-size: .74rem; font-weight: 600; letter-spacing: 0; margin: 0 0 .45rem .2rem; }
aside.outline ul { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
aside.outline li { display: flex; justify-content: space-between; gap: .4rem; border-radius: 7px; padding: .12rem .3rem; transition: background .15s; }
aside.outline li:hover { background: var(--fill); }
aside.outline li a:first-child { display: flex; align-items: center; gap: .45rem; min-width: 0; font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label); }
aside.outline li a:hover { text-decoration: none; }
aside.outline li.d1 { margin-left: .9rem; } aside.outline li.d2 { margin-left: 1.8rem; }
aside.outline li.d3 { margin-left: 2.7rem; } aside.outline li.d4 { margin-left: 3.6rem; }
/* Symbol badges in the manner of Xcode's navigator. */
.kind.sym { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4.5px; color: #fff; font-family: var(--font); font-size: 10px; font-weight: 700; background: var(--gray); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.kind.k-fn { background: var(--blue); } .kind.k-ty { background: var(--purple); }
.kind.k-co { background: var(--teal); } .kind.k-mo { background: var(--orange); }
aside.outline a.hist { color: var(--label3); visibility: hidden; }
aside.outline li:hover a.hist { visibility: visible; }
@media (max-width: 1000px) { aside.outline { display: none; } }

/* ---------------------------------------------------------------- changes and diffs */
.changehead { margin: .25rem 0 1.25rem; }
.changehead h2 { font-size: 1.5rem; }
.changehead .num { color: var(--label3); font-family: var(--mono); font-weight: 500; }
pre.msg { white-space: pre-wrap; background: none; margin: .25rem 0 .5rem; font-family: var(--font); font-size: .97rem; letter-spacing: -.01em; }
.mergenote { border-radius: var(--r-m); padding: .7rem 1.1rem; margin-top: .7rem; background: color-mix(in srgb, var(--orange) 14%, var(--glass)); box-shadow: 0 0 0 .5px color-mix(in srgb, var(--orange) 45%, transparent); }
.mergenote ul { margin: .3rem 0 0; }

.filediff { margin-bottom: 1rem; overflow-x: auto; }
.filediff h3 { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0; padding: .6rem 1rem; margin: 0; border-bottom: .5px solid var(--separator); display: flex; align-items: center; gap: .6rem; }
.filediff h3 a { color: var(--label); }
.status { font-family: var(--font); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .12rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.status.deleted, .status.removed { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.status.added, .status.introduced { background: color-mix(in srgb, var(--green) 18%, transparent); color: color-mix(in srgb, var(--green) 72%, var(--label)); }
ul.sem { list-style: none; margin: 0; padding: .55rem 1rem; border-bottom: .5px solid var(--separator); font-size: .86rem; display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; }
ul.sem .verb { font-weight: 650; }
ul.sem li.added .verb { color: color-mix(in srgb, var(--green) 72%, var(--label)); } ul.sem li.deleted .verb { color: var(--red); }
ul.sem li.modified .verb { color: color-mix(in srgb, var(--orange) 80%, var(--label)); } ul.sem li.renamed .verb, ul.sem li.moved .verb { color: var(--blue); }
ul.sem .kind { color: var(--label2); } ul.sem b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
ul.sem .parent { font-family: var(--mono); font-size: 12.5px; color: var(--label2); }
.filediff p.note { padding: .55rem 1rem; margin: 0; }
table.diff { width: 100%; }
table.diff td { padding: 0 .6rem; white-space: pre; line-height: 1.55; vertical-align: top; }
table.diff td.ln { width: 1%; min-width: 2.8rem; text-align: right; color: var(--label3); user-select: none; -webkit-user-select: none; font-variant-numeric: tabular-nums; }
table.diff tr.add td { background: var(--add); } table.diff tr.del td { background: var(--del); }
table.diff tr.gap td { text-align: center; color: var(--label3); background: var(--fill); }
ul.plain { margin: 0; padding: .5rem 2rem; font-family: var(--mono); font-size: 12.5px; }

ul.defs { list-style: none; padding: 0; margin: 0 0 1.25rem; }
ul.defs li { padding: .22rem 0; font-family: var(--mono); font-size: 12.5px; }
ul.defs .kind, .tree { color: var(--label2); }
.hit { margin-bottom: .9rem; }
.hit h4 { margin: 0; padding: .5rem 1rem; border-bottom: .5px solid var(--separator); font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0; }
.hit .code td { line-height: 1.6; }
mark { background: var(--hl); color: inherit; border-radius: 3px; }

/* ---------------------------------------------------------------- popover */
#pop { position: absolute; z-index: 40; background: var(--glass-thick); -webkit-backdrop-filter: blur(40px) saturate(190%); backdrop-filter: blur(40px) saturate(190%); border-radius: 18px; box-shadow: var(--shadow-pop); padding: .8rem .95rem; min-width: 320px; max-width: 580px; font-size: .88rem; transform-origin: top left; animation: pop .22s var(--ease); }
#pop[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
#pop > * { position: relative; z-index: 1; }
#pop h5 { margin: 0 0 .5rem; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0; }
#pop h5 .badge { margin-left: .5rem; }
#pop pre.doc { margin: 0 0 .55rem; padding: .5rem .65rem; background: var(--fill); border-radius: var(--r-s); white-space: pre-wrap; max-height: 220px; overflow: auto; font-size: 12px; }
#pop ul { list-style: none; margin: 0 0 .5rem; padding: 0; max-height: 260px; overflow: auto; }
#pop li { padding: .2rem .4rem; margin: 0 -.4rem; border-radius: 7px; font-family: var(--mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pop li:hover { background: var(--fill); }
#pop .kind { color: var(--label2); margin-right: .4rem; }
#pop .foot { border-top: .5px solid var(--separator); padding-top: .5rem; display: flex; gap: 1rem; align-items: center; }

/* ---------------------------------------------------------------- proposals, owners, getting started */
a.quietlink { color: var(--label2); font-weight: 500; font-size: .92rem; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
a.quietlink:hover { background: var(--fill); color: var(--label); text-decoration: none; }
.count.hot { background: var(--blue); color: #fff; }
h3.spaced { margin-top: 1.75rem; }
textarea { font: inherit; letter-spacing: inherit; color: var(--label); border: none; border-radius: var(--r-s); padding: .6rem .75rem; background: var(--fill); resize: vertical; width: 100%; }
textarea:focus { outline: none; box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--blue) 38%, transparent); }
.dirbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--label2); font-size: .86rem; margin: 0 .2rem .6rem; }
.dirbar b { color: var(--label); font-weight: 600; }
.dirbar .actions, .statusbox .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.dirbar .actions a { padding: .18rem .7rem; border-radius: 999px; background: var(--fill); color: var(--label); font-weight: 500; }
.dirbar .actions a:hover { background: var(--fill-hover); text-decoration: none; }
.statusbox { position: relative; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: var(--r-l); padding: 1.1rem 1.3rem; margin-bottom: 1.25rem; box-shadow: var(--shadow), inset 0 0 0 1px var(--rim-low), inset 0 1px 0 var(--rim); }
.statusbox h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.statusbox h4 { margin: 1rem 0 .4rem; color: var(--label2); font-family: var(--font); font-size: .78rem; letter-spacing: 0; }
.statusbox p { margin: .2rem 0; }
.statusbox .actions { margin-top: 1rem; }
.statusbox .actions form { margin: 0; }
ul.waiting { margin: .2rem 0; padding-left: 1.2rem; }
.chip { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .12rem .55rem; border-radius: 999px; background: var(--fill); color: var(--label2); margin-right: .6rem; min-width: 4.4rem; text-align: center; }
.chip.passed { background: color-mix(in srgb, var(--green) 18%, transparent); color: color-mix(in srgb, var(--green) 72%, var(--label)); }
.chip.failed, .chip.error { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.chip.running { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
details.check { border-radius: var(--r-s); padding: .3rem .5rem; margin: 0 -.5rem; }
details.check:hover { background: var(--fill); }
details.check summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .3rem; }
details.check summary::-webkit-details-marker { display: none; }
details.check summary .note { margin-left: .6rem; font-size: .84rem; }
pre.log { margin: .5rem 0 .3rem; padding: .7rem .9rem; background: var(--content); border-radius: var(--r-s); max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.comment { background: var(--content); border-radius: var(--r-m); padding: .6rem 1rem .3rem; margin-bottom: .6rem; box-shadow: 0 0 0 .5px var(--separator); }
.comment p.meta { margin: 0; font-size: .84rem; }
form.commentbox { max-width: 720px; margin-top: .8rem; }
.steps { display: flex; flex-direction: column; gap: .9rem; max-width: 900px; margin-bottom: 1.5rem; }
.step { display: flex; gap: 1rem; background: var(--content); border-radius: var(--r-l); padding: 1.1rem 1.3rem; box-shadow: 0 0 0 .5px var(--separator), 0 2px 12px rgba(0, 0, 0, .05); }
.step > div { min-width: 0; flex: 1; }
.stepnum { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 80%, #fff), var(--blue)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.step h3 { margin-bottom: .35rem; }
.step p { margin: .35rem 0; }
.step ul { margin: .35rem 0; padding-left: 1.2rem; }
.step pre { background: var(--fill); border-radius: var(--r-s); padding: .7rem .9rem; overflow-x: auto; margin: .5rem 0; }
.step code { background: var(--fill); padding: .08rem .35rem; border-radius: 5px; }
.step pre code { background: none; padding: 0; }

/* ---------------------------------------------------------------- accessibility */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root { --glass: var(--canvas); --glass-thick: var(--canvas); --content: var(--canvas); --blur: none; }
  #pop { -webkit-backdrop-filter: none; backdrop-filter: none; }
  body::before { display: none; }
  header.top, nav.tabs, .card, aside.outline, #pop, .sheet, form.inline, .filebar, table.listing, table.changes, .codewrap, .filediff, .readme, .hit { box-shadow: 0 0 0 1px var(--label3); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: var(--glass-thick); }
}
@media (max-width: 720px) {
  header.top { gap: .5rem; padding-left: .7rem; }
  .brand span, a.who .name { display: none; }
  .treebar h1 { font-size: 1.5rem; }
  td.author, td.time { display: none; }
}
