:root {
  --mint: #2fc596;
  --mint-d: #12906a;
  --mint-dd: #0a5f46;
  --mint-l: #d8f8ec;
  --mint-ll: #effcf7;
  --ink: #12302a;
  --muted: #5d7a71;
  --line: #cfe8de;
  --bg: #f7fcfa;
  --card: #ffffff;
  --code: #0d2b24;
  --red: #c2413a;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --mint: #3fdcac;
    --mint-d: #3fdcac;
    --mint-dd: #8cf0cf;
    --mint-l: #123d31;
    --mint-ll: #0f2a23;
    --ink: #e4f6ef;
    --muted: #8fb3a6;
    --line: #1f4a3d;
    --bg: #091a15;
    --card: #0e231d;
    --code: #061410;
    --red: #ff8b82;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--mint-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
.muted { color: var(--muted); }
.pad { padding: 24px 16px; }
.small { font-size: .875rem; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }

.top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--mint-dd); }
.brand:hover { text-decoration: none; }
.search { flex: 1 1 200px; max-width: 360px; }
.search input { width: 100%; }
#nav { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 20px 16px 40px; }
.foot { text-align: center; padding: 18px 16px; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); }

input, textarea, select { font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--mint-l); border-color: var(--mint); }
textarea { width: 100%; min-height: 360px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.5; tab-size: 2; }
label { display: block; font-weight: 600; margin: 14px 0 4px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 700; cursor: pointer; border: 1.5px solid var(--mint); background: var(--mint); color: #06382a; padding: 8px 16px; border-radius: 10px; }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--mint-dd); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--mint); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }

.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); }
.hero { background: linear-gradient(135deg, var(--mint-l), var(--mint-ll)); border: 1.5px solid var(--line); border-radius: 18px; padding: 34px 24px; margin-bottom: 26px; }
.hero h1 { font-size: 2.1rem; color: var(--mint-dd); }
.hero p { max-width: 560px; font-size: 1.1rem; }
.hero .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.repo { display: block; padding: 14px 16px; color: inherit; }
.repo:hover { text-decoration: none; border-color: var(--mint); }
.repo .nm { font-weight: 700; color: var(--mint-dd); word-break: break-word; }
.repo .ds { color: var(--muted); font-size: .92rem; margin: 4px 0 8px; min-height: 1.4em; }
.meta { color: var(--muted); font-size: .82rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.badge { font-size: .72rem; font-weight: 700; border: 1.5px solid var(--line); color: var(--muted); border-radius: 99px; padding: 1px 8px; }
.cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .cols.two { grid-template-columns: 1fr 1fr; } }

.repohead { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 6px; }
.repohead h1 { margin: 0; font-size: 1.5rem; word-break: break-word; }
.repohead .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin: 14px 0; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 10px 10px 0 0; color: var(--muted); font-weight: 600; }
.tabs a.on { color: var(--mint-dd); background: var(--mint-l); }
.tabs a:hover { text-decoration: none; background: var(--mint-ll); }
.clone { display: flex; gap: 8px; align-items: center; background: var(--code); color: #c8f7e6; padding: 8px 12px; border-radius: 10px; overflow-x: auto; margin: 10px 0; }
.clone code { flex: 1; white-space: nowrap; }
.clone .btn { flex: none; }

table.files { width: 100%; border-collapse: collapse; }
table.files td { padding: 8px 14px; border-top: 1px solid var(--line); }
table.files tr:first-child td { border-top: 0; }
table.files tr:hover td { background: var(--mint-ll); }
table.files td.sz { text-align: right; color: var(--muted); font-size: .82rem; white-space: nowrap; width: 1%; }
.latest { padding: 10px 14px; border-bottom: 1.5px solid var(--line); background: var(--mint-ll); border-radius: var(--radius) var(--radius) 0 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.latest .msg { font-weight: 600; }
.crumbs { margin: 6px 0 10px; font-weight: 600; word-break: break-all; }
.crumbs .sep { color: var(--muted); padding: 0 4px; }
.readme { margin-top: 18px; padding: 14px 18px; white-space: pre-wrap; word-wrap: break-word; }
.code { background: var(--code); color: #d6f7ea; border-radius: var(--radius); overflow: auto; }
.code table { border-collapse: collapse; width: 100%; }
.code td { padding: 0 12px; vertical-align: top; white-space: pre; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.55; }
.code td.n { color: #5f8c7e; text-align: right; user-select: none; width: 1%; border-right: 1px solid #17463a; }
.saves .row { display: flex; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: baseline; }
.saves .row:first-child { border-top: 0; }
.saves .msg { font-weight: 600; flex: 1 1 240px; color: var(--ink); word-break: break-word; }
.chg { padding: 8px 14px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.chg .t { font-weight: 700; width: 70px; flex: none; font-size: .8rem; text-transform: uppercase; }
.chg .t.new { color: var(--mint-d); }
.chg .t.changed { color: #a67a00; }
.chg .t.removed { color: var(--red); }
.formcard { max-width: 520px; padding: 22px; margin: 0 auto; }
.formcard.wide { max-width: 100%; }
.formcard input[type=text], .formcard input[type=password], .formcard input:not([type]) { width: 100%; }
.err { color: var(--red); font-weight: 600; min-height: 1.4em; margin-top: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; margin: 14px 0 0; }
.tokenbox { background: var(--mint-l); border: 1.5px dashed var(--mint); border-radius: 10px; padding: 10px 12px; margin: 10px 0; word-break: break-all; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.doc h2 { margin-top: 1.6em; }
.doc pre { background: var(--code); color: #d6f7ea; padding: 12px 14px; border-radius: 10px; overflow-x: auto; }
.doc table { border-collapse: collapse; width: 100%; }
.doc td { border-top: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
.doc td:first-child { white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); background: var(--mint-dd); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-color-scheme: dark) { #toast { background: var(--mint); color: #06382a; } }
img.pic { max-width: 100%; display: block; margin: 12px auto; }
