/* AJ-Panel — pikseliretro. Vanha netti. Uusi koti. */
@font-face { font-family: "PressStart"; src: url("../fonts/press-start-2p-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("../fonts/vt323-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("../fonts/vt323-latin-ext-400-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0100-024F; }

:root {
  --paper: #f3efe4;
  --paper-2: #e8e1cf;
  --surface: #fffdf7;
  --ink: #121212;
  --muted: #5d5a52;
  --line: #121212;
  --blue: #275bf1;
  --blue-ink: #ffffff;
  --blue-soft: #dfe7ff;
  --yellow: #ffd43b;
  --pink: #ff6fae;
  --green: #17a967;
  --green-soft: #d6f5e6;
  --red: #e5383b;
  --red-soft: #ffe0de;
  --dot: rgba(18, 18, 18, .13);
  --shade: #121212;
  --shadow: 6px 6px 0 var(--shade);
  --shadow-sm: 4px 4px 0 var(--shade);
  --pixel: "PressStart", ui-monospace, monospace;
  --mono: "VT323", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1022; --paper-2: #151a36; --surface: #161b38; --ink: #ecebe2; --muted: #a9a8c4;
    --line: #ecebe2; --blue: #4b78ff; --blue-soft: #1f2a5c; --yellow: #ffd43b; --green: #2fd18a;
    --green-soft: #12382a; --red: #ff5a5d; --red-soft: #3d1517; --dot: rgba(236, 235, 226, .09);
    --shade: #3d5bff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1022; --paper-2: #151a36; --surface: #161b38; --ink: #ecebe2; --muted: #a9a8c4;
  --line: #ecebe2; --blue: #4b78ff; --blue-soft: #1f2a5c; --yellow: #ffd43b; --green: #2fd18a;
  --green-soft: #12382a; --red: #ff5a5d; --red-soft: #3d1517; --dot: rgba(236, 235, 226, .09);
  --shade: #3d5bff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 22px/1.25 var(--mono);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
}
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { background: var(--yellow); color: #121212; }
::selection { background: var(--yellow); color: #121212; }
:focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
img { max-width: 100%; }
code, kbd, .code { font-family: var(--mono); background: var(--paper-2); padding: 0 6px; border: 2px solid var(--line); }
kbd { box-shadow: 2px 2px 0 var(--shade); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: #121212; padding: 8px 12px; z-index: 99; border: 3px solid #121212; }
.skip:focus { left: 8px; }

/* ---------- layout ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 3px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { background: none; color: var(--ink); }
.brand-mark {
  font: 12px/1 var(--pixel); background: var(--blue); color: #fff; padding: 9px 9px 8px; border: 3px solid var(--line);
  box-shadow: 3px 3px 0 var(--shade);
}
.brand-text { font: 11px/1.5 var(--pixel); letter-spacing: .5px; }
.brand-text small { display: block; font: 18px/1 var(--mono); color: var(--muted); letter-spacing: 0; }
.topbar .spacer { flex: 1; }
.who { font-size: 21px; display: inline-flex; align-items: center; gap: 8px; border: 3px solid var(--line); padding: 3px 12px; background: var(--paper); }
.led { width: 10px; height: 10px; background: var(--green); border: 2px solid var(--line); animation: led 2.4s steps(1) infinite; }
@keyframes led { 85% { background: var(--green); } 90% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .led { animation: none; } }

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding: 28px 24px 60px; max-width: 1400px; margin: 0 auto; }
.side { position: sticky; top: 92px; align-self: start; }
.nav { display: flex; flex-direction: column; gap: 0; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--ink);
  border: 3px solid var(--line); margin-bottom: -3px; background: var(--surface); font-size: 22px;
}
.nav a .px { width: 18px; height: 18px; color: var(--blue); flex: none; }
.nav a:hover { background: var(--yellow); color: #121212; }
.nav a:hover .px { color: #121212; }
.nav a.on { background: var(--blue); color: #fff; position: relative; z-index: 1; }
.nav a.on .px { color: #fff; }
.nav a.on::after { content: ""; margin-left: auto; width: 0; height: 0; border-left: 8px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.nav a.disabled { color: var(--muted); }
.nav-label { font: 9px/1 var(--pixel); color: var(--muted); margin: 22px 0 10px; letter-spacing: 1px; }
.side-card { margin-top: 28px; border: 3px dashed var(--line); padding: 14px 16px; font-size: 20px; }
.side-card .sc-k { font: 8px/1 var(--pixel); color: var(--muted); letter-spacing: 1px; margin-bottom: 6px; }
.side-card .sc-v { margin-bottom: 12px; overflow-wrap: anywhere; }
.side-card .sc-v:last-child { margin-bottom: 0; }
main { min-width: 0; }

.imp-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between;
  background: repeating-linear-gradient(45deg, var(--yellow) 0 14px, #121212 14px 28px);
  border-bottom: 3px solid var(--line); padding: 8px 20px;
}
.imp-bar span { background: var(--yellow); color: #121212; padding: 2px 10px; border: 3px solid #121212; font-size: 20px; }

/* ---------- headings ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 26px; }
.eyebrow { font: 10px/1 var(--pixel); color: var(--blue); letter-spacing: 1px; margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--pixel); font-weight: normal; letter-spacing: .5px; margin: 0; }
h1 { font-size: 24px; line-height: 1.4; }
h1 .cursor, .cursor::after { color: var(--blue); }
.cursor::after { content: "_"; animation: blink 1.1s steps(1) infinite; }
h2 { font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
h3 { font-size: 12px; line-height: 1.5; margin-bottom: 10px; }
.lead { font-size: 24px; color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor::after { animation: none; } }

/* ---------- windows ---------- */
.win { background: var(--surface); border: 3px solid var(--line); box-shadow: var(--shadow); margin-bottom: 28px; min-width: 0; }
.win-title {
  display: flex; align-items: center; gap: 10px; background: var(--blue); color: #fff; padding: 8px 10px 8px 14px;
  border-bottom: 3px solid var(--line); font: 10px/1.4 var(--pixel); letter-spacing: .5px;
}
.win-title .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-title .ctl { display: flex; gap: 4px; }
.win-title .ctl i { width: 18px; height: 16px; border: 2px solid #121212; background: var(--surface); display: block; box-shadow: inset -2px -2px 0 var(--paper-2); }
.win-title.alt { background: var(--yellow); color: #121212; }
.win-title.danger { background: var(--red); }
.win-title.ok { background: var(--green); color: #121212; }
.win-body { padding: 20px; }
.win-body > :first-child { margin-top: 0; }
.win-body > :last-child { margin-bottom: 0; }
.win-foot { border-top: 3px solid var(--line); padding: 12px 20px; background: var(--paper-2); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.grid { display: grid; gap: 24px; margin-bottom: 28px; align-items: start; }
.grid.stretch { align-items: stretch; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .win { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }

/* ---------- stat tiles ---------- */
.tile { display: block; background: var(--surface); border: 3px solid var(--line); box-shadow: var(--shadow-sm); padding: 16px 18px; min-width: 0; color: var(--ink); text-decoration: none; position: relative; }
.tile .k { font: 9px/1.5 var(--pixel); color: var(--muted); letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.tile .k .px { width: 16px; height: 16px; color: var(--blue); }
.tile .v { font: 26px/1.2 var(--pixel); margin-top: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .v small { font: 20px var(--mono); color: var(--muted); }
.tile .of { font-size: 19px; color: var(--muted); margin-top: 4px; }
.tile.link { transition: transform .06s, box-shadow .06s; }
.tile.link:hover { background: var(--surface); color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shade); }
.tile.link::after { content: ""; position: absolute; right: 16px; top: 16px; width: 7px; height: 7px; border-top: 3px solid currentColor; border-right: 3px solid currentColor; opacity: .35; }
.tile.blue { background: var(--blue); color: #fff; }
.tile.blue .k, .tile.blue .v small, .tile.blue .of, .tile.blue .k .px { color: #dfe7ff; }
.tile.yellow { background: var(--yellow); color: #121212; }
.tile.yellow .k, .tile.yellow .v small, .tile.yellow .of, .tile.yellow .k .px { color: #3a3523; }
.tile.yellow.link:hover { background: var(--yellow); color: #121212; }

/* segmented pixel progress bar */
.bar { height: 28px; border: 3px solid var(--line); background: var(--paper-2); position: relative; margin: 8px 0 18px; padding: 3px; }
.bar > span {
  display: block; height: 100%; min-width: 0;
  background: repeating-linear-gradient(90deg, var(--blue) 0 12px, transparent 12px 16px);
  max-width: 100%;
}
.bar.warn > span { background: repeating-linear-gradient(90deg, #e09b00 0 14px, transparent 14px 18px); }
.bar.full > span { background: repeating-linear-gradient(90deg, var(--red) 0 14px, transparent 14px 18px); }
.bar-label { display: flex; justify-content: space-between; font-size: 19px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 10px/1.4 var(--pixel); letter-spacing: .5px; text-decoration: none; text-transform: uppercase;
  padding: 12px 16px 11px; border: 3px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm); cursor: pointer; white-space: nowrap; transition: transform .05s, box-shadow .05s;
}
.btn:hover { background: var(--yellow); color: #121212; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shade); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #121212; color: var(--yellow); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #121212; color: var(--red); }
.btn.ghost { box-shadow: none; background: transparent; }
.btn.sm { padding: 8px 10px 7px; font-size: 8px; box-shadow: 3px 3px 0 var(--shade); }
.btn.sm:active { transform: translate(3px, 3px); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; cursor: pointer; }

/* ---------- forms ---------- */
label { display: block; font: 9px/1.5 var(--pixel); letter-spacing: .5px; margin: 0 0 8px; }
.field { margin-bottom: 18px; min-width: 0; }
.field .hint { font-size: 19px; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; font: 22px/1.2 var(--mono); color: var(--ink); background: var(--surface);
  border: 3px solid var(--line); padding: 9px 12px; border-radius: 0; box-shadow: inset 3px 3px 0 var(--paper-2);
}
select { -webkit-appearance: none; appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: inset 3px 3px 0 var(--blue-soft), 0 0 0 3px var(--blue-soft); }
textarea { min-height: 140px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; font: 21px var(--mono); margin: 6px 0 14px; letter-spacing: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }
.inline { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.inline > input, .inline > select { flex: 1 1 180px; width: auto; }
.inline .btn { box-shadow: none; }
.input-group { display: flex; align-items: stretch; }
.input-group input { flex: 1; min-width: 0; }
.input-group .addon { border: 3px solid var(--line); border-left: 0; padding: 9px 12px; background: var(--paper-2); font-size: 22px; white-space: nowrap; }
.input-group .addon.pre { border-left: 3px solid var(--line); border-right: 0; }
.input-group .btn { box-shadow: none; border-left: 0; }
form.inline-form { display: inline; }
.req::after { content: " *"; color: var(--red); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 21px; }
th { font: 8px/1.5 var(--pixel); letter-spacing: .5px; text-align: left; color: var(--muted); padding: 10px 12px; border-bottom: 3px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 2px dashed color-mix(in srgb, var(--line) 30%, transparent); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--yellow) 22%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 30px 12px; }
.empty .big { font: 26px/1 var(--pixel); color: var(--blue); display: block; margin-bottom: 14px; }

/* ---------- badges / flash ---------- */
.badge { display: inline-block; font: 8px/1 var(--pixel); padding: 6px 8px 5px; border: 2px solid var(--line); background: var(--paper-2); color: var(--ink); letter-spacing: .5px; vertical-align: middle; white-space: nowrap; }
.badge.ok { background: var(--green); color: #121212; }
.badge.err { background: var(--red); color: #fff; }
.badge.warn { background: var(--yellow); color: #121212; }
.badge.blue { background: var(--blue); color: #fff; }
.sticker { display: inline-block; font: 9px/1 var(--pixel); background: var(--yellow); color: #121212; border: 3px solid var(--line); padding: 8px 10px; transform: rotate(-3deg); box-shadow: 3px 3px 0 var(--shade); }

.flashes { margin-bottom: 24px; display: grid; gap: 12px; }
.flash { border: 3px solid var(--line); box-shadow: var(--shadow-sm); padding: 12px 16px 12px 52px; position: relative; background: var(--surface); font-size: 22px; white-space: pre-line; }
.flash::before { position: absolute; left: 14px; top: 13px; font: 13px/1 var(--pixel); }
.flash.ok { background: var(--green-soft); } .flash.ok::before { content: "✓"; color: var(--green); }
.flash.err { background: var(--red-soft); } .flash.err::before { content: "!"; color: var(--red); }
.flash.info { background: var(--blue-soft); } .flash.info::before { content: "i"; color: var(--blue); }

.dot { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); background: var(--muted); vertical-align: middle; margin-right: 6px; }
.dot.ok { background: var(--green); } .dot.err { background: var(--red); } .dot.warn { background: var(--yellow); }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 19px; }
.mono-box { font: 20px/1.3 var(--mono); background: #0b0d1a; color: #c8f7c5; border: 3px solid var(--line); padding: 14px 16px; overflow: auto; max-height: 420px; white-space: pre-wrap; word-break: break-all; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.kv dt { font: 9px/2.2 var(--pixel); color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.copy { cursor: pointer; }
.copy:hover { background: var(--yellow); color: #121212; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 22px; }
.crumbs a { text-decoration: none; padding: 0 4px; }
.crumbs .sep { color: var(--muted); }
details { border: 3px solid var(--line); margin-top: 10px; background: var(--surface); }
details > summary { cursor: pointer; padding: 8px 12px; font: 9px/1.6 var(--pixel); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "＋ "; color: var(--blue); }
details[open] > summary::before { content: "－ "; }
details[open] > summary { border-bottom: 3px solid var(--line); background: var(--paper-2); }
details > .d-body { padding: 14px; }
.danger-zone { border-color: var(--red); }
.hr { border: 0; border-top: 3px dashed var(--line); margin: 22px 0; }
.typebox { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.typebox label { margin: 0; cursor: pointer; }
.typebox input { position: absolute; opacity: 0; pointer-events: none; }
.typebox .opt { border: 3px solid var(--line); padding: 12px; background: var(--surface); height: 100%; box-shadow: 3px 3px 0 var(--shade); }
.typebox .opt b { display: block; font: 10px/1.5 var(--pixel); margin-bottom: 6px; }
.typebox .opt span { font: 19px/1.2 var(--mono); color: var(--muted); letter-spacing: 0; }
.typebox input:checked + .opt { background: var(--blue); color: #fff; }
.typebox input:checked + .opt span { color: #dfe7ff; }
.typebox input:focus-visible + .opt { outline: 3px dashed var(--blue); outline-offset: 3px; }
.when { display: none; }
.when.show { display: block; }
.editor { width: 100%; min-height: 60vh; font: 20px/1.3 var(--mono); tab-size: 4; white-space: pre; background: #0b0d1a; color: #e6e6e6; box-shadow: none; }
.fileicon { font: 10px/1 var(--pixel); color: var(--blue); width: 22px; display: inline-block; }
.footer { text-align: center; color: var(--muted); font-size: 19px; padding: 0 20px 30px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.login { width: 100%; max-width: 460px; }
.login .win { box-shadow: 10px 10px 0 var(--shade); }
.login-hero { text-align: center; margin-bottom: 28px; }
.login-hero .brand-mark { display: inline-block; font-size: 16px; padding: 12px; margin-bottom: 18px; }
.login-hero h1 { font-size: 20px; }
.login-hero p { margin: 10px 0 0; color: var(--muted); }
.ticker { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 22px; font-size: 19px; color: var(--muted); }

.theme-toggle { font: 9px/1 var(--pixel); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 18px 16px 50px; gap: 18px; }
  .side { position: static; }
  .nav { flex-direction: row; overflow-x: auto; gap: 0; padding-bottom: 8px; }
  .nav a { margin-bottom: 0; margin-right: -3px; white-space: nowrap; font-size: 20px; padding: 8px 12px; }
  .nav-label, .side-card { display: none; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .who { display: none; }
  .typebox { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 20px; }
  .g4 { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 10px 16px; }
  .brand-text { display: none; }
  h1 { font-size: 18px; }
  .win-body { padding: 16px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { line-height: 1.4; margin-top: 6px; }
}

/* progress widths (CSP kieltää inline-tyylit) */
.w0{width:0%}.w1{width:1%}.w2{width:2%}.w3{width:3%}.w4{width:4%}.w5{width:5%}.w6{width:6%}.w7{width:7%}.w8{width:8%}.w9{width:9%}.w10{width:10%}.w11{width:11%}.w12{width:12%}.w13{width:13%}.w14{width:14%}.w15{width:15%}.w16{width:16%}.w17{width:17%}.w18{width:18%}.w19{width:19%}.w20{width:20%}.w21{width:21%}.w22{width:22%}.w23{width:23%}.w24{width:24%}.w25{width:25%}.w26{width:26%}.w27{width:27%}.w28{width:28%}.w29{width:29%}.w30{width:30%}.w31{width:31%}.w32{width:32%}.w33{width:33%}.w34{width:34%}.w35{width:35%}.w36{width:36%}.w37{width:37%}.w38{width:38%}.w39{width:39%}.w40{width:40%}.w41{width:41%}.w42{width:42%}.w43{width:43%}.w44{width:44%}.w45{width:45%}.w46{width:46%}.w47{width:47%}.w48{width:48%}.w49{width:49%}.w50{width:50%}.w51{width:51%}.w52{width:52%}.w53{width:53%}.w54{width:54%}.w55{width:55%}.w56{width:56%}.w57{width:57%}.w58{width:58%}.w59{width:59%}.w60{width:60%}.w61{width:61%}.w62{width:62%}.w63{width:63%}.w64{width:64%}.w65{width:65%}.w66{width:66%}.w67{width:67%}.w68{width:68%}.w69{width:69%}.w70{width:70%}.w71{width:71%}.w72{width:72%}.w73{width:73%}.w74{width:74%}.w75{width:75%}.w76{width:76%}.w77{width:77%}.w78{width:78%}.w79{width:79%}.w80{width:80%}.w81{width:81%}.w82{width:82%}.w83{width:83%}.w84{width:84%}.w85{width:85%}.w86{width:86%}.w87{width:87%}.w88{width:88%}.w89{width:89%}.w90{width:90%}.w91{width:91%}.w92{width:92%}.w93{width:93%}.w94{width:94%}.w95{width:95%}.w96{width:96%}.w97{width:97%}.w98{width:98%}.w99{width:99%}.w100{width:100%}
.mt { margin-top: 16px; } .sp { height: 28px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.qr { background: #fff; padding: 8px; border: 3px solid var(--line); }

/* ---------- pikselikuvakkeet ---------- */
.px { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; flex: none; }
.btn .px { width: 14px; height: 14px; vertical-align: middle; }
.btn.sm .px { width: 12px; height: 12px; }
.icon-btn { padding-left: 11px; padding-right: 11px; }
.btn.sm.icon-btn { padding: 7px 8px; }
.btn.block { width: 100%; padding: 15px; }
.i-sun { display: none !important; }
:root[data-theme="dark"] .i-sun { display: inline-block !important; }
:root[data-theme="dark"] .i-moon { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: inline-block !important; }
  :root:not([data-theme="light"]) .i-moon { display: none !important; }
}
[data-show].on { background: var(--yellow); color: #121212; }
.copied { background: var(--green) !important; color: #121212 !important; }
.badge .px { width: 9px; height: 9px; vertical-align: -1px; }
.badge.yel { background: var(--yellow); color: #121212; }
.fname { white-space: nowrap; }
.fileicon { display: inline-flex; width: 28px; color: var(--muted); vertical-align: -2px; }
.fileicon.dir { color: var(--blue); }
.fileicon .px { width: 16px; height: 16px; }
.up-link { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-size: 21px; }
.up-link .px { width: 14px; height: 14px; }
.crumbs .px { width: 14px; height: 14px; }
.ticker .px { width: 13px; height: 13px; color: var(--blue); }
.ticker span { display: inline-flex; align-items: center; gap: 6px; }
.imp-bar .px { width: 14px; height: 14px; }
.flash a { font-weight: normal; }

/* ---------- alapalkki (taskbar) ---------- */
.taskbar { display: flex; align-items: center; gap: 14px; border-top: 3px solid var(--line); background: var(--paper-2); padding: 8px 16px; font-size: 19px; }
.taskbar .start { display: inline-flex; align-items: center; gap: 10px; font: 9px/1 var(--pixel); border: 3px solid var(--line); background: var(--surface); padding: 5px 12px 5px 5px; box-shadow: 3px 3px 0 var(--shade); }
.brand-mark.sm { font-size: 8px; padding: 5px; border-width: 2px; box-shadow: none; }
.tb-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tb-item .px { width: 12px; height: 12px; color: var(--green); }
.tb-spacer { flex: 1; }
.tb-clock { border: 3px solid var(--line); padding: 2px 10px; background: var(--surface); font-size: 18px; box-shadow: inset 2px 2px 0 var(--paper-2); }

/* ---------- kirjautumissivun koristeet ---------- */
.login-wrap { position: relative; overflow: hidden; }
.login { position: relative; z-index: 2; }
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.deco-win { position: absolute; width: 270px; background: var(--surface); border: 3px solid var(--line); box-shadow: 8px 8px 0 var(--shade); }
.deco-win .win-title { font-size: 8px; }
.deco-body { padding: 14px 16px; font-size: 20px; line-height: 1.3; }
.deco-win.d1 { left: 7%; top: 16%; transform: rotate(-4deg); }
.deco-win.d2 { right: 7%; bottom: 16%; transform: rotate(3deg); width: 250px; }
.deco-sticker { position: absolute; right: 12%; top: 15%; transform: rotate(6deg); background: var(--yellow); color: #121212; border: 3px solid var(--line); box-shadow: 5px 5px 0 var(--shade); padding: 12px 14px; font: 9px/1.8 var(--pixel); }
.deco-sticker b { font-weight: normal; color: var(--blue); }
@media (max-width: 1100px) { .deco { display: none; } }
.ticker .linkbtn { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- pienet näytöt ---------- */
@media (max-width: 900px) { .hide-sm { display: none !important; } }
@media (max-width: 560px) {
  .tile .v { font-size: 20px; }
  .taskbar .tb-item { display: none; }
  .btn.sm.icon-btn { padding: 6px 7px; }
  td .actions { gap: 6px; }
}

.inline > input, .inline > select { min-width: 0; }
@media (max-width: 560px) {
  .inline { flex-wrap: nowrap; }
  .inline > input, .inline > select { flex: 1 1 0; }
  .inline .btn { flex: none; }
  form.inline { width: 100%; }
}
