:root {
  color-scheme: dark;
  --bg: #050a06;
  --shell: #0b140d;
  --panel: #0a120b;
  --panel-header: #112716;
  --line: #345d3b;
  --thin: #233a28;
  --green: #a2e8ab;
  --bright: #d0ffd0;
  --muted: #779a7d;
  --blue: #81b3ff;
  --blue-hover: #c1d9ff;
  --status: #65e88b;
}
* {box-sizing: border-box}
html {scroll-behavior: smooth}
body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--green);
  font: 14px/1.6 Consolas, 'Lucida Console', 'Courier New', monospace;
  -webkit-text-size-adjust: 100%;
}
a {color: var(--blue); text-decoration: none}
a:hover {color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px}
a:focus-visible {outline: 2px solid var(--status); outline-offset: 3px}
button {font: inherit}
.shell {
  width: min(1020px, calc(100% - 44px));
  margin: clamp(20px, 5.5vh, 68px) auto 36px;
  border: 1px solid #5a8460;
  background: var(--shell);
  box-shadow: 5px 5px 0 #102316, 0 17px 48px #0009;
}
.titlebar {
  min-height: 42px;
  background: linear-gradient(180deg, #24502c, #13351c);
  border-bottom: 1px solid #5c8e62;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  font: bold 13px/1.3 Tahoma, Verdana, sans-serif;
  letter-spacing: .7px;
  color: #e0ffe2;
}
.brand {display: flex; align-items:center; min-width: 0; gap: 10px}
.brand-icon {display:grid; place-items:center; width: 23px; height: 23px; flex:none; border:1px solid #8ec295; background:#09210e; color:#bbffbf; font: bold 14px Tahoma,Verdana,sans-serif}
.brand-text {overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.window-buttons {display:flex; align-items:center; gap:4px; flex:none}
.window-buttons span {display:grid; place-items:center; width: 23px; height: 21px; border:1px solid #6ea177; background:#173b1e; color:#caffcf; font: 13px/1 Tahoma,sans-serif}
.navbar {display:flex; align-items:center; flex-wrap:wrap; gap: 6px 24px; padding: 9px 23px; border-bottom:1px solid var(--thin); background:#0d1d10}
.navbar a {display:inline-flex; align-items:center; min-height: 37px; font-size:12px; font-weight:bold}
.navbar a[aria-current="page"] {color: var(--bright); text-decoration:underline; text-underline-offset:5px}
.navbar .path {color:#77be82; font-size:12px; margin-right:auto; white-space:nowrap}
.page {padding: clamp(18px, 3.6vw, 32px)}
.hero {display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; padding-bottom:23px; border-bottom:1px solid var(--thin)}
.eyebrow {color:#79aa82; font-size:11px; letter-spacing:1px; margin: 0 0 7px}
h1 {font-size:clamp(22px, 4vw, 34px); line-height:1.25; color:var(--bright); letter-spacing: .8px; margin:0}
h1 .cursor {color:#66b873}
.subtitle {margin: 8px 0 0; color: var(--muted); font-size:12px}
.status-card {min-width: 188px; padding:9px 13px; border:1px solid #406f47; background:#0d2312}
.status-row {display:flex; align-items:center; gap:9px; color:#afffc0; font-size:12px; font-weight:bold}
.status-dot {width:8px; height:8px; background:var(--status); border-radius:50%; box-shadow:0 0 9px #50d77785; flex:none}
.status-domain {color:#72ab7b; font-size:11px; margin:3px 0 0 17px}
.columns {display:grid; grid-template-columns:minmax(0, 1.55fr) minmax(0, 1fr); gap:20px; margin-top:23px; align-items:start}
.panel {border:1px solid var(--line); background:var(--panel); min-width:0}
.panel-head {display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:42px; padding:9px 14px; border-bottom:1px solid var(--line); background:var(--panel-header)}
h2 {font-size:13px; font-weight:bold; line-height:1.4; letter-spacing:.6px; color:#d1ffd5; margin:0}
.panel-head a {color:#b5eaff; min-height:26px; display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:bold}
.panel-head a:hover {color:#e5f3ff}
.panel-tag {color:var(--muted); font-size:10px; white-space:nowrap}
.folders {list-style:none; margin:0; padding:9px 13px 12px}
.folders li + li {border-top:1px dashed #253c29}
.folder {display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:73px; padding:12px 5px}
.folder-main {display:flex; align-items:center; gap:12px; min-width:0}
.folder-icon {display:grid; place-items:center; width:29px; height:27px; flex:none; color:#d8bd6c; border:1px solid #5f6641; background:#292c13; font-size:20px; line-height:1}
.folder-name {font-size:15px; font-weight:bold; overflow-wrap:anywhere}
.folder-description {color:var(--muted); font-size:11px; margin-top:3px}
.folder-meta {white-space:nowrap; font-size:10px; color:#739577; border:1px solid #29422d; padding:2px 6px}
.news-preview {padding:19px 17px 16px; min-height:225px; display:flex; flex-direction:column; align-items:flex-start}
.news-date {display:block; color:#7dbe88; font-size:11px; margin-bottom:9px}
.news-title {font-size:14px; font-weight:bold; color:#d6ffda; margin:0 0 7px}
.news-copy {margin:0 0 20px; font-size:12px; color:#a6c8ab; line-height:1.7; overflow-wrap:anywhere}
.news-more {margin-top:auto; font-size:12px; border-top:1px solid var(--thin); padding-top:13px; width:100%}
.news-more a {min-height:32px; display:inline-flex; align-items:center}
.bottom-note {margin-top:20px; display:flex; gap:10px; align-items:flex-start; border:1px solid #26472c; background:#0b1d0e; padding:11px 13px; color:#8bab91; font-size:11px}
.bottom-note strong {color:#a6dbaa}
.footer {border-top:1px solid var(--line); display:flex; justify-content:space-between; flex-wrap:wrap; gap:7px 18px; padding:12px 23px; color:#77aa7e; font-size:11px}
.footer a {color:#96c1ff}
.breadcrumb {font-size:11px; color:var(--muted); margin-bottom:20px}
.breadcrumb a {margin-right:5px}
.news-list {list-style:none; margin:0; padding:0}
.news-entry {padding:21px 19px; border-bottom:1px solid var(--thin); position:relative}
.news-entry:last-child {border-bottom:0}
.news-entry::before {content:''; position:absolute; width:5px; height:5px; top:28px; left:8px; background:#58bc75}
.news-entry time {display:block; font-size:11px; color:#82b88b; margin-bottom:5px}
.news-entry h3 {font-size:15px; line-height:1.45; color:#d1ffd8; margin:0 0 7px}
.news-entry p {margin:0; color:#a4bfaa; font-size:12px; overflow-wrap:anywhere}
.empty-folder {padding:25px 20px; color:var(--muted); min-height:180px}
.empty-folder strong {display:block; color:#c9ebce; font-size:13px; margin-bottom:8px}
.empty-folder p {margin:0 0 19px; font-size:12px}
.count {color:#87bd90; font-size:11px}
@media(max-width:760px){
  .shell {width: min(100% - 24px, 640px); margin: 12px auto 26px; box-shadow:3px 3px 0 #102316}
  .columns {grid-template-columns:minmax(0,1fr)}
  .navbar {padding:8px 14px; gap:3px 17px}
  .page {padding:20px 15px}
  .status-card {min-width: 170px}
  .news-preview {min-height:170px}
  .footer {padding:12px 15px}
}
@media(max-width:430px){
  .titlebar {padding:7px 8px; font-size:12px}
  .window-buttons span {width:19px; height:19px; font-size:11px}
  .window-buttons span:first-child {display:none}
  .navbar .path {flex-basis:100%; margin:0}
  .navbar a {min-height:42px}
  .hero {align-items:stretch}
  .status-card {width:100%}
  .folder-meta {display:none}
  .folder-description {max-width:230px}
  .panel-head {padding:10px 11px}
  .folders {padding:6px 9px}
  .folder {min-height:65px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* v3: download directories and cross-device refinements */
.directory-actions {margin-top: 18px; display:flex; flex-wrap:wrap; gap:10px}
.directory-actions a {display:inline-flex; min-height:40px; align-items:center; border:1px solid var(--line); background:#102215; padding:8px 14px}
.catalogue {list-style:none; margin:0; padding:0}
.catalogue-item {display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; padding:14px 18px; gap:9px 16px; border-bottom:1px solid var(--thin)}
.catalogue-item:last-child {border-bottom:0}
.catalogue-name {font-weight:bold; font-size:13px; overflow-wrap:anywhere; word-break:break-word; min-width:0}
.catalogue-size {color:var(--muted);font-size:11px; white-space:nowrap}
.catalogue-link {border:1px solid #3b633f;background:#122615;padding:6px 12px; display:inline-flex; align-items:center;min-height:36px; white-space:nowrap}
.catalogue-placeholder {padding:26px 18px; color:var(--muted);font-size:12px}
.catalogue-placeholder strong {display:block;color:var(--bright);font-size:13px;margin-bottom:5px}
.page-intro {color:var(--muted);font-size:12px;line-height:1.75;margin:10px 0 0}
.skip-link{position:absolute;left:10px;top:-60px;z-index:10;background:#d1ffd8;color:#041005;padding:8px 12px}
.skip-link:focus{top:8px;color:#041005}
@media (max-width:430px) {
  .shell {width: calc(100% - 14px); margin: 7px auto 20px}
  .page {padding:16px 12px}
  .titlebar {min-height:44px}
  .catalogue-item{align-items:flex-start}
  .catalogue-link{width:100%;justify-content:center}
}
@supports (padding: max(0px)) {
  .footer {padding-bottom:max(12px,env(safe-area-inset-bottom))}
}

/* NETKILKA Control v1 visual refinements */
.brand-admin-link{cursor:pointer;text-decoration:none;transition:background .15s,color .15s}
.brand-admin-link:hover,.brand-admin-link:focus-visible{background:#24552e;color:#f0fff3;text-decoration:none}
.folder-icon-real{width:38px;height:32px;padding:0;border:0;background:transparent;display:grid;place-items:center;flex:none}
.folder-icon-real svg{display:block;filter:drop-shadow(1px 2px 0 #000a)}
.folder:hover .folder-icon-real svg{filter:brightness(1.22) drop-shadow(1px 2px 0 #000a)}
.cursor{display:inline-block;animation:nkcursor 1.1s steps(1,end) infinite;color:#80e991!important}
@keyframes nkcursor{50%{opacity:0}}
.news-body{color:#b8d7bd;font-size:12px;overflow-wrap:anywhere;line-height:1.65}
.news-body a{color:#85b5ff}.news-body p{margin:.4em 0}.news-image{display:block;max-width:100%;max-height:220px;object-fit:contain;image-rendering:pixelated;margin:8px 0 14px;border:0;background:transparent}
.catalogue-controls{display:flex;gap:8px;padding:12px;flex-wrap:wrap;border-bottom:1px solid #29462e}
.catalogue-controls input,.catalogue-controls select{font:inherit;background:#081509;color:#c4faca;border:1px solid #37653f;padding:9px;min-width:0;flex:1}
.catalogue-controls select{flex:0 0 150px}
.file-table{border-collapse:collapse;width:100%;min-width:570px}
.file-table th,.file-table td{padding:13px 11px;border-bottom:1px solid #28452f;text-align:left;font-size:12px}
.file-table th{color:#8bb895;background:#0d1c10;font-size:11px}
.file-table td:first-child a{color:#8db9ff;font-weight:bold}
.file-table td:not(:first-child){color:#a2c5a9;white-space:nowrap}
.file-table a.dl{border:1px solid #395b3f;background:#112615;padding:5px 8px}
.file-list-wrap{width:100%;overflow-x:auto}
.foldercrumb{border-bottom:1px dashed #294831;padding:10px 14px;color:#7eaf87}
.foldercrumb button{font:inherit;background:transparent;border:0;color:#8db9ff;cursor:pointer;padding:2px 6px}
.folder-row{padding:10px 15px;border-bottom:1px dashed #28452f}
.folder-row button{background:none;border:0;color:#8db9ff;font:inherit;cursor:pointer}
body:has(>.shell) .bottom-note{display:none}
@media (min-width:900px) and (min-height:650px) {
  /* The document grows when needed; never nest a scrollbar inside the homepage. */
  .shell:has(.page #directory) {
    height:auto;
    min-height:min(650px, calc(100dvh - 32px));
    max-height:none;
    margin:16px auto;
    display:flex;
    flex-direction:column;
  }
  .shell:has(.page #directory) .page {flex:1;min-height:0;overflow:visible}
  .shell:has(.page #directory) .footer {margin-top:auto}
  /* Keep the latest news thumbnail compact on the desktop homepage. */
  .shell:has(.page #directory) .news-image {max-height:min(150px, 23dvh)}
}
@media(prefers-reduced-motion:reduce){.cursor{animation:none}}
@media(max-width:600px){.catalogue-controls input{flex-basis:100%}.catalogue-controls select{flex:1}}

/* NETKILKA UI 1.0.1: stable desktop viewport, pixel branding, subtle motion */
.brand-icon.brand-admin-link{width:34px;height:34px;min-width:34px;padding:2px;border:1px solid #508457;background:#0c2211;transition:background .18s,transform .18s,box-shadow .18s;text-decoration:none}
.nk-site-logo{display:block;width:28px;height:28px;object-fit:contain;image-rendering:auto}
.brand-icon.brand-admin-link:hover,.brand-icon.brand-admin-link:focus-visible{background:#153e21;transform:translateY(-1px);box-shadow:0 0 12px #4acf7280}
.brand-text{font-weight:700;letter-spacing:1px}
.nk-uptime{font-variant-numeric:tabular-nums;color:#9bdfaa;white-space:nowrap}
.nk-uptime [data-nk-uptime]{color:#c0fbc8}
.status-card{display:none!important}
.titlebar{background:linear-gradient(180deg,#25552e 0%,#14391e 100%)}
.folder,.file-table tbody tr,.directory-actions a,.folder-row{transition:background-color .18s ease,border-color .18s ease,transform .18s ease}
.folder:hover{transform:translateX(3px)}
.file-table tbody tr:hover,.folder-row:hover{background:#14291a}
.directory-actions a:hover{background:#1b3823;border-color:#76b785;text-decoration:none}
.catalogue-controls{display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:stretch;gap:8px}
.catalogue-controls input,.catalogue-controls select{width:100%;max-width:100%;min-height:43px}
.catalogue-controls select{flex:none}
.news-image{max-height:160px;max-width:100%;object-fit:contain;background:transparent;border:0;image-rendering:pixelated}
@keyframes nk-ui-appear{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.shell{animation:nk-ui-appear .28s ease-out both}
@media (min-width:861px) and (min-height:620px) {
  html,body,body:has(.page #directory){height:100%;min-height:0;overflow:hidden}
  .shell,.shell:has(.page #directory){display:flex;flex-direction:column;height:calc(100dvh - 36px);min-height:0;max-height:none;margin:18px auto;overflow:hidden}
  .titlebar,.navbar,.footer{flex:0 0 auto}
  .page,.shell:has(.page #directory) .page{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden;padding:clamp(15px,2.1vh,25px) 28px}
  .page>.breadcrumb{flex:0 0 auto;margin-bottom:clamp(5px,1.2vh,12px)}
  .page>.hero{flex:0 0 auto;padding-bottom:clamp(10px,1.5vh,19px)}
  .page>.columns{flex:1 1 auto;min-height:0;align-items:stretch;margin-top:clamp(12px,2vh,22px)}
  .columns>.panel{display:flex;flex-direction:column;min-height:0;overflow:hidden}
  .columns>.panel .panel-head{flex:0 0 auto}
  .columns>.panel .folders,.columns>.panel .news-preview{flex:1 1 auto;min-height:0;overflow:auto}
  .page>section.panel{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden;margin-top:clamp(10px,1.8vh,20px)!important}
  .page>section.panel>.panel-head,.page>section.panel>.catalogue-controls{flex:0 0 auto}
  .page>section.panel [data-catalogue],.page>section.panel .news-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#486e50 #0b180e;scrollbar-width:thin}
  .directory-actions{flex:0 0 auto;margin-top:clamp(9px,1.6vh,16px)}
  .directory-actions a{min-height:35px;padding:6px 12px}
  .page-intro{margin:4px 0 0}
  .news-image{max-height:min(160px,22dvh)}
  .footer{margin-top:auto;padding-top:9px;padding-bottom:9px}
}
@media(max-width:860px), (max-height:619px){
  html,body,body:has(.page #directory){height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
  .shell,.shell:has(.page #directory){display:block;height:auto;max-height:none;min-height:0;overflow:visible}
  .page,.shell:has(.page #directory) .page{display:block;overflow:visible;min-height:0}
  .catalogue-controls{grid-template-columns:minmax(0,1fr) 135px}
}
@media(max-width:480px){.catalogue-controls{grid-template-columns:1fr}.navbar{gap:3px 10px}.footer{justify-content:space-between}.footer>span:nth-child(2){display:none}}
@media(prefers-reduced-motion:reduce){.shell,.folder,.file-table tbody tr,.directory-actions a,.folder-row,.brand-admin-link{animation:none!important;transition:none!important}}

