:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  --canvas: #f3f6f7;
  --surface: #fff;
  --control-line: #93a6aa;
  --primary-bg: #07695a;
  --primary-text: #fff;
  --primary-hover: #035649;
  --tint: #e1f4ec;
  --ink: #172d35;
  --muted: #50636a;
  --line: #cdd9db;
  --brand: #07695a;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --canvas: #111c22;
  --surface: #1b2b32;
  --ink: #e8f1f0;
  --muted: #b4c6cb;
  --line: #40545c;
  --control-line: #708890;
  --brand: #85e2c6;
  --primary-bg: #85e2c6;
  --primary-text: #102d26;
  --primary-hover: #a4efd8;
  --tint: #28463e;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
a { color: var(--brand); text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #277dcc; outline-offset: 3px; }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { line-height: 1.2; text-wrap: pretty; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); letter-spacing: -.05em; }
h2 { font-size: 1.35rem; letter-spacing: -.025em; }
h3 { font-size: 1.12rem; }
header { background: #152c34; color: white; }
.bar, main { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.bar { min-height: 4.5rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; gap: .62rem; align-items: center; font-weight: 750; color: white; text-decoration: none; font-size: 1.35rem; letter-spacing: -.035em; }
.mark { width: 1.7rem; height: 1.7rem; border-radius: .45rem; background: #7de8c5; display: grid; place-items: center; }
.mark::after { content: ''; width: .68rem; height: .33rem; border: solid #153831; border-width: 0 0 .18rem .18rem; transform: translateY(-.08rem) rotate(-45deg); }
.main-nav, .account { display: flex; align-items: center; gap: .35rem; }
.main-nav a, .account button { color: #e4efee; text-decoration: none; font-size: .94rem; padding: .5rem .85rem; border-radius: .45rem; }
.main-nav [aria-current], .main-nav a:hover, .account button:hover { color: white; background: #2b444c; }
.account { margin-left: auto; gap: .7rem; }
.account-link { display: flex; align-items: center; gap: .5rem; border-radius: .45rem; padding: .3rem .5rem; color: #eef6f4; text-decoration: none; }
.account-link:hover, .account-link[aria-current] { background: #2b444c; }
.account-label { display: grid; line-height: 1.25; font-size: .76rem; }
.account-label strong { font-size: .92rem; }
.avatar { width: 1.85rem; height: 1.85rem; display: inline-grid; vertical-align: middle; place-items: center; flex: none; border-radius: 50%; color: #21483e; background: #daf2e8; font: 650 .82rem/1 system-ui,sans-serif; }
.meta .avatar { width: 1.45rem; height: 1.45rem; font-size: .75rem; }
.account button { background: transparent; border: 1px solid #587077; }
main { margin-block: 2.75rem 5rem; overflow-wrap: anywhere; }
.guest { width: min(100% - 2rem, 27rem); margin-top: clamp(3rem, 11vh, 7rem); }
.page-head, .section-head, .record-head, .actions, .status-form, .record-foot, .pager { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.page-head, .section-head, .record-head { justify-content: space-between; }
.page-head { margin-bottom: 1.65rem; }
.section-head { margin: 1.65rem 0 1rem; }
.back { display: inline-block; font-size: .94rem; margin-bottom: .65rem; }
.back::before { content: '‹'; margin-right: .4rem; }
.intro, .desc, small, .meta, .optional { color: var(--muted); }
.intro { margin: -.8rem 0 1.4rem; max-width: 75ch; white-space: pre-line; }
.tabs { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; }
.tabs a { padding: .7rem .05rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: var(--brand); border-color: var(--brand); }
.sheet, .project-card, .record, .people, .empty { border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); }
.sheet, .project-card, .record { padding: clamp(1.05rem, 3vw, 1.65rem); }
.sheet > * + *, .auth > * + * { margin-top: 1.15rem; }
.auth { box-shadow: 0 .65rem 2rem #172d350b; border-top: 4px solid var(--brand); }
.auth h1 { font-size: 2.15rem; }
.form { max-width: 45rem; }
form:not(.status-form) > label, form > fieldset { display: block; margin-bottom: 1.05rem; }
form .actions { margin-top: 1.4rem; }
label, legend { font-weight: 650; }
.optional { font-weight: 400; font-size: .875rem; margin-left: .3rem; }
label small { display: block; font-size: .875rem; font-weight: 400; margin-top: .3rem; }
input, select, textarea, button { font: inherit; }
input:not([type=hidden],[type=radio]), select, textarea { background-color: var(--surface); border: 1px solid var(--control-line); border-radius: .42rem; color: var(--ink); padding: .58rem .75rem; }
label input:not([type=radio]), label select, label textarea { display: block; width: 100%; margin-top: .32rem; font-weight: 400; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 2.4rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 1rem) 50%, calc(100% - .7rem) 50%; background-size: .32rem .32rem; background-repeat: no-repeat; }
.button, button { display: inline-flex; justify-content: center; align-items: center; gap: .45rem; min-height: 2.6rem; padding: .5rem 1rem; border-radius: .45rem; border: 1px solid transparent; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { text-decoration: none; }
.primary { color: var(--primary-text); background: var(--primary-bg); }
.primary:hover { background: var(--primary-hover); }
.quiet { background: var(--surface); border-color: var(--control-line); color: var(--brand); }
.quiet:hover { background: var(--tint); }
fieldset { margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
.choices { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: .45rem; }
.choices label { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--control-line); border-radius: .45rem; padding: .5rem .78rem; font-weight: 500; cursor: pointer; }
.choices label:has(input:checked) { background: var(--tint); border-color: var(--brand); }
input[type=radio] { accent-color: var(--brand); margin: 0; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.project-card { display: flex; flex-direction: column; border-top: 3px solid #78ac9f; }
.project-card h2 a, .record h3 a { color: var(--ink); text-decoration: none; }
.project-card h2 a:hover, .record h3 a:hover { color: var(--brand); text-decoration: underline; }
.desc { margin: .55rem 0 0; white-space: pre-line; }
.counts { display: flex; gap: clamp(1.25rem, 3vw, 2.4rem); padding-top: 1.25rem; margin-top: auto; }
.counts div { display: flex; flex-direction: column-reverse; }
.counts dt, .meta, .source, .people small { font-size: .875rem; }
.counts dt { color: var(--muted); }
.counts dd { margin: 0; font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.record { margin-bottom: .75rem; scroll-margin-top: 1rem; }
.record:target { border-color: var(--brand); }
.record-head { align-items: start; gap: .5rem; }
.meta { margin-top: .4rem; }
.badge { font-size: .875rem; font-weight: 650; border-radius: .35rem; padding: .12rem .55rem; white-space: nowrap; }
.passed, .closed { background: #dcf3e5; color: #19553b; }
.failed { background: #fde4e4; color: #8b2530; }
.partial { background: #e9e7fa; color: #4a397d; }
.blocked, .verify { background: #fcecc7; color: #694900; }
.new { background: #e6eced; color: #344c53; }
.working { background: #e2edfb; color: #264f8a; }
.prose { white-space: pre-wrap; margin: .8rem 0; max-width: 85ch; }
.full-text { margin-top: .5rem; min-width: 0; }
.full-text summary { color: var(--brand); cursor: pointer; }
.people li > div, .record-head h3 { min-width: 0; }
.record-foot, .status-form { border-top: 1px solid var(--line); margin-top: .9rem; padding-top: .75rem; font-size: .94rem; }
.status-form select, .status-form button { min-height: 2.4rem; padding-block: .3rem; }
.source, .context { margin-top: .75rem; }
.context strong { display: block; }
.columns { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
.columns h2, #powiazane h2 { margin-bottom: 1rem; }
.people { padding: 0; margin: 0; list-style: none; overflow: hidden; }
.people li { padding: .85rem 1rem; display: flex; gap: .7rem; align-items: center; justify-content: space-between; }
.people li + li { border-top: 1px solid var(--line); }
.people small { display: block; }
.empty { padding: 2.2rem 1.25rem; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: .5rem; }
.notice { padding: .7rem 1rem; border-radius: .45rem; }
.error { background: #fbe4e4; color: #7d2230; }
.success { background: var(--tint); color: var(--brand); }
:root[data-theme=dark] .passed, :root[data-theme=dark] .closed { background: #244b3e; color: #a9edc9; }
:root[data-theme=dark] .failed, :root[data-theme=dark] .error { background: #532e37; color: #ffc9cc; }
:root[data-theme=dark] .partial { background: #423955; color: #ded0ff; }
:root[data-theme=dark] .blocked, :root[data-theme=dark] .verify { background: #504128; color: #ffde9b; }
:root[data-theme=dark] .new { background: #34474e; color: #dfebed; }
:root[data-theme=dark] .working { background: #2c435d; color: #c5dfff; }
.theme-swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border: 1px solid #79918a; border-radius: 50%; }
.theme-swatch.light { background: #f3f6f7; }
.theme-swatch.dark { background: #17282f; }
.file-picker { min-width: 0; }
.file-picker input { max-width: 100%; }
.file-picker ul, .gallery { margin: 0; padding: 0; list-style: none; }
.file-message { color: var(--brand); font-size: .9rem; }
.file-previews li { display: flex; align-items: center; gap: .7rem; margin-top: .45rem; }
.file-previews img { width: 4rem; height: 3rem; object-fit: contain; background: var(--canvas); border-radius: .25rem; }
.file-previews span { flex: 1; min-width: 0; }
.file-previews button { min-height: 2rem; padding: .2rem .6rem; font-size: .875rem; }
.add-screens form { max-width: 36rem; margin-top: .7rem; }
.gallery { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .8rem; }
.gallery li { width: min(9rem,100%); }
.gallery a { font-size: .875rem; }
.gallery img { display: block; width: 100%; height: 6rem; object-fit: contain; background: var(--canvas); border: 1px solid var(--line); border-radius: .4rem; }
.pager { justify-content: center; margin-top: 1.4rem; }
#powiazane { margin-top: 1.65rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; left: .5rem; top: .5rem; padding: .5rem; z-index: 1; background: var(--surface); }
@media (max-width: 43rem) {
  .bar, main { width: min(100% - 1.5rem, 70rem); }
  .bar { flex-wrap: wrap; gap: .4rem .8rem; padding: .65rem 0; }
  .account { gap: .2rem; }
  .main-nav { order: 3; width: 100%; }
  .account-label strong { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { margin-top: 1.55rem; }
  .columns { grid-template-columns: 1fr; }
  .tabs { gap: 0 .8rem; }
  .page-head, .section-head { align-items: start; }
}
