/* ---------- kod (przeglądarka repozytorium) ---------- */
body.repo-page { background: var(--bg); }
.links a.on { color: var(--text); }
.repo { padding: 108px 0 80px; }

.repo-head { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: center; }
.repo-title { display: flex; gap: 16px; align-items: center; }
.repo-tree {
    width: 56px; height: 56px; flex: none; padding: 11px; color: #fff; border-radius: 16px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2);
}
.repo-title h1 { font-size: 30px; line-height: 1.1; }
.repo-title p { color: var(--dim); margin-top: 6px; font-size: 15px; max-width: 560px; }
.repo-tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.repo-tags span {
    font: 600 12px var(--head); color: var(--dim); padding: 5px 12px; border-radius: 999px;
    border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.03);
}
.repo-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 10px; }
.repo-actions .btn { padding: 12px 22px; }
.repo-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.repo-actions small { font: 600 12px var(--body); opacity: 0.55; }

.steps-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0 22px; }
.steps-mini div {
    display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--line); color: var(--dim); font-size: 14px; line-height: 1.45;
}
.steps-mini b {
    flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: #fff; color: #111; font: 700 13px var(--head);
}
.steps-mini code, .md code {
    font: 13px ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--text);
    background: rgba(255, 255, 255, 0.07); padding: 2px 6px; border-radius: 6px;
}

/* układ: drzewo + podgląd */
.browser {
    display: grid; grid-template-columns: 290px minmax(0, 1fr); border: 1px solid var(--line2);
    border-radius: var(--radius); background: rgba(255, 255, 255, 0.02); overflow: clip; min-height: 560px;
}
.side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.find { position: relative; padding: 12px; border-bottom: 1px solid var(--line); }
.find svg {
    position: absolute; left: 24px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
    fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round;
}
.find input {
    width: 100%; font: 14px var(--body); color: var(--text); background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line2); border-radius: 10px; padding: 9px 12px 9px 36px; outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.find input:focus { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.06); }
.tree-list { overflow: auto; padding: 8px 6px 14px; max-height: calc(100vh - 120px); position: sticky; top: 80px; }
.tn {
    display: flex; align-items: center; gap: 7px; width: 100%; padding: 5px 8px 5px calc(8px + var(--d, 0) * 14px);
    border: 0; background: none; color: var(--dim); font: 13.5px var(--body); text-align: left; cursor: pointer;
    border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.tn.cur { background: rgba(255, 255, 255, 0.09); color: #fff; }
.tn .chev { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; transition: transform 0.15s; opacity: 0.7; }
.tn.open .chev { transform: rotate(90deg); }
.tn .fi { width: 16px; height: 16px; flex: none; }
.tn span { overflow: hidden; text-overflow: ellipsis; }
.tn small { color: var(--faint); font-size: 12px; margin-left: auto; padding-left: 8px; overflow: hidden; text-overflow: ellipsis; }
.tn.hit { flex-wrap: nowrap; }
.no-hits { color: var(--faint); font-size: 13px; padding: 12px; }

/* ikony plików */
.fi { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.fi.dir { fill: rgba(255, 255, 255, 0.85); stroke: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.bar {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
    min-height: 56px; position: sticky; top: 68px; z-index: 5; background: rgba(13, 14, 18, 0.92); backdrop-filter: blur(12px);
}
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font: 600 14px var(--head); min-width: 0; }
.crumbs a { color: var(--dim); padding: 2px 4px; border-radius: 6px; transition: color 0.2s, background 0.2s; }
.crumbs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.crumbs b { color: var(--text); padding: 2px 4px; word-break: break-all; }
.crumbs i { color: var(--faint); font-style: normal; }
.bar-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
.chip {
    font: 600 12.5px var(--head); color: var(--text); padding: 7px 12px; border-radius: 9px; cursor: pointer;
    border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.04); transition: background 0.2s, border-color 0.2s;
}
.chip:hover { background: rgba(255, 255, 255, 0.1); }
.chip.ok { border-color: rgba(91, 234, 114, 0.5); color: var(--green); }

.view { min-width: 0; }
.loading, .note { padding: 48px 20px; text-align: center; color: var(--dim); }
.note b { display: block; color: var(--text); font: 600 17px var(--head); margin-bottom: 6px; }
.note .btn { margin-top: 18px; }

/* lista folderu */
.list-head {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025); font: 600 14px var(--head);
}
.list-head svg { width: 20px; height: 20px; color: #fff; }
.list-head small { margin-left: auto; color: var(--faint); font: 13px var(--body); }
.row-f {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; transition: background 0.15s;
}
.row-f:hover { background: rgba(255, 255, 255, 0.035); }
.row-f .fi { width: 18px; height: 18px; color: var(--dim); }
.row-f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-f span i { color: var(--faint); font-style: normal; }
.row-f:hover span { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; }
.row-f small { color: var(--faint); font-size: 13px; }
.row-f.up span { color: var(--dim); }

/* README */
.readme { margin: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.readme-h {
    display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line);
    font: 600 13px var(--head); color: var(--dim);
}
.readme-h svg { width: 16px; height: 16px; }
.md { padding: 22px 26px 26px; font-size: 15px; line-height: 1.65; color: #dcdce2; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3 { color: #fff; margin: 26px 0 10px; }
.md h1 { font-size: 28px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.md h2 { font-size: 21px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 17px; }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 10px 0; padding-left: 22px; }
.md li { margin: 4px 0; }
.md a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.md pre { margin: 12px 0; padding: 14px 16px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.md pre code { background: none; padding: 0; }
.md table { border-collapse: collapse; margin: 12px 0; display: block; overflow: auto; }
.md th, .md td { border: 1px solid var(--line2); padding: 7px 12px; text-align: left; }
.md th { background: rgba(255, 255, 255, 0.04); font: 600 14px var(--head); }

/* podgląd pliku */
.file-info { display: flex; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.code-wrap { overflow: auto; }
.code { border-collapse: collapse; width: 100%; font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace; tab-size: 4; }
.code td { padding: 0; vertical-align: top; }
.code .ln {
    width: 1%; min-width: 52px; padding: 0 14px 0 16px; text-align: right; color: var(--faint); user-select: none; cursor: pointer;
}
.code .ln::before { content: attr(data-n); }
.code .lc { padding: 0 20px 0 6px; white-space: pre; color: #e3e3e8; }
.code tr:first-child td { padding-top: 12px; }
.code tr:last-child td { padding-bottom: 14px; }
.code tr:hover .ln { color: var(--dim); }
.code tr.hl td { background: rgba(255, 214, 102, 0.1); }
.code tr.hl .ln { color: #ffd666; }
.t-c { color: #7d7f8c; font-style: italic; }
.t-s { color: #a6e3a1; }
.t-k { color: #cba6f7; }
.t-n { color: #fab387; }
.t-a { color: #89dceb; }
.t-t { color: #f9e2af; }
.t-v { color: #f5c2e7; }
.t-h { color: #89b4fa; }
.img-view {
    padding: 28px; display: grid; place-items: center;
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.05) 0 25%, transparent 0 50%) 0 0 / 20px 20px;
}
.img-view img { max-width: 100%; max-height: 70vh; image-rendering: pixelated; border-radius: 6px; }
.img-view.smooth img { image-rendering: auto; }

/* telefony */
@media (max-width: 900px) {
    .repo-head { grid-template-columns: minmax(0, 1fr); }
    .repo-actions { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; }
    .steps-mini { grid-template-columns: 1fr; }
    .browser { grid-template-columns: minmax(0, 1fr); }
    .side { border-right: 0; border-bottom: 1px solid var(--line); }
    .tree-list { display: none; position: static; max-height: 320px; }
    .side.searching .tree-list { display: block; }
    .bar { flex-wrap: wrap; }
    .bar-actions { margin-left: 0; }
}
@media (max-width: 560px) {
    .repo { padding-top: 92px; }
    .repo-title h1 { font-size: 24px; }
    .repo-tree { width: 46px; height: 46px; padding: 9px; }
    .repo-actions .btn { flex: 1 1 100%; }
    .md { padding: 18px; }
    .readme { margin: 12px; }
    .row-f small { display: none; }
}

/* ---------- o projekcie: języki, wersje, zasady ---------- */
.repo-tags a {
    font: 600 12px var(--head); color: var(--text); padding: 5px 12px; border-radius: 999px;
    border: 1px solid rgba(91, 234, 114, 0.45); background: rgba(91, 234, 114, 0.08);
}
.about { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.about-card { padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.about-card h2 { font: 600 14px var(--head); margin-bottom: 14px; }
.lang-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(255, 255, 255, 0.05); }
.lang-bar span { display: block; height: 100%; }
.lang-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.lang-list li { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.lang-list i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lang-list b { font-weight: 600; }
.lang-list span { color: var(--faint); }
.about-sub { color: var(--faint); font-size: 12.5px; margin-top: 12px; }
.stack { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.stack li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); min-width: 0; }
.stack b { font-weight: 600; white-space: nowrap; }
.stack span { color: var(--dim); font-family: ui-monospace, Consolas, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-rules li { position: relative; padding-left: 24px; font-size: 13.5px; color: var(--dim); }
.mini-rules li::before {
    position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
    font: 700 9px var(--head);
}
.mini-rules li.y::before { content: "✓"; background: rgba(91, 234, 114, 0.16); color: #5bea72; }
.mini-rules li.n::before { content: "✕"; background: rgba(255, 90, 90, 0.14); color: #ff7070; }
.about-links { margin-top: 14px; font-size: 13px; color: var(--faint); }
.about-links a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; }
@media (max-width: 1100px) { .links { gap: 18px; font-size: 14px; } }
@media (max-width: 980px) {
    .links { display: none; }
    .lang { margin-left: auto; }
    .about { grid-template-columns: 1fr; }
}
