/* Stochos Downloads - same look as the Stochos Flow Server portal and the desktop app (dark theme only).
   Fonts are bundled under /static/fonts (SIL OFL 1.1, see fonts/LICENSE-*.txt). */
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #1B1E22; --surface: #25292E; --surface-2: #2C3137; --ink: #E7E9EC; --muted: #A1A9B3; --line: #3A4047;
  --shell: #2A2E33; --shell-ink: #E6E8EB; --shell-muted: #9AA2AC; --shell-line: #474D55;
  --accent: #FFA726; --accent-soft: #4A3516; --accent-ink: #1D2126;
  --ok: #57C98D; --ok-soft: #1F3A2C; --warn: #F2B544; --warn-soft: #3D3118; --bad: #F2857A; --bad-soft: #43231F;
  --info: #7FB0EA; --info-soft: #1F3045;
  --tile: #363B41; --tile-line: #4A5058;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Cascadia Mono", "Courier New", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font-body); }
a { color: var(--info); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: 1.75rem; line-height: 1.15; } h2 { font-size: 1.3rem; }
p { margin: 0; }
button, input { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono, code { font-family: var(--font-mono); font-size: .85em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* shell: slate side bar + workspace */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--shell); color: var(--shell-ink); padding: 18px 16px; display: flex; flex-direction: column; gap: 22px; border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; align-self: start; overflow: hidden; }  /* stays in view; only the product list scrolls */
.brand { display: flex; gap: 10px; align-items: center; color: var(--shell-ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 6px; background: var(--tile); border: 1px solid var(--tile-line); display: grid; place-items: center; flex: none; }
.brand b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.brand small { display: block; color: var(--shell-muted); font-size: .72rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.nav { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; }
.brand, .side-foot { flex: none; }
/* HTML order is brand, sign-out, nav (so Tab order = reading order on a phone); desktop shows the sign-out row last */
.brand { order: 0; } .nav { order: 1; } .side-foot { order: 2; }
.skip-link { position: absolute; left: 8px; top: -64px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 7px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; }
.content:focus { outline: none; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.nav .label { color: var(--shell-muted); padding: 0 10px 6px; }
.nav a { color: var(--shell-ink); text-decoration: none; padding: 7px 10px; border-radius: 6px; display: flex; gap: 10px; align-items: center; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }  /* inside: the nav scrolls and would clip a ring outside */
.side-foot { margin-top: auto; font-size: .75rem; color: var(--shell-muted); line-height: 1.45; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-foot b { color: var(--shell-ink); font-weight: 500; overflow-wrap: anywhere; }
.side-foot form { margin: 0; }
.side-foot button { background: none; border: 1px solid var(--shell-line); color: var(--shell-ink); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.side-foot button:hover { border-color: var(--shell-muted); }

.main { min-width: 0; }
.content { padding: 26px 28px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1240px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; }
.page-head .grow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-margin-top: 16px; }
.card > h2 { font-size: 1.15rem; }
.icon { width: 44px; height: 44px; border-radius: 8px; background: var(--tile); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px var(--tile-line); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; padding: 1px 8px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-ok { color: var(--ok); background: var(--ok-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 7px; padding: 7px 14px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; line-height: 1.4; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.small { padding: 3px 10px; font-size: .82rem; }

/* versions: newest open, older ones collapsible */
details.ver { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
details.ver > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
details.ver > summary .v-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
details.ver > summary::-webkit-details-marker, details.verif > summary::-webkit-details-marker { display: none; }
details.ver > summary::before, details.verif > summary::before { content: ""; flex: none; border: 5px solid transparent; border-left: 7px solid var(--muted); border-right: 0; }
details.ver[open] > summary::before, details.verif[open] > summary::before { border: 5px solid transparent; border-top: 7px solid var(--muted); border-bottom: 0; }
details.ver[open] > summary { border-bottom: 1px solid var(--line); }
details.ver .table-wrap { border-radius: 0 0 8px 8px; background: var(--surface); }
/* release date in the summary line; release notes: plain text, line breaks kept, closed by default */
details.ver > summary .v-date { white-space: nowrap; }
details.notes { border-bottom: 1px solid var(--line); }
details.notes > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .86rem; }
details.notes > summary:hover { color: var(--ink); }
details.notes > summary::-webkit-details-marker { display: none; }
details.notes > summary::before { content: ""; flex: none; border: 5px solid transparent; border-left: 7px solid var(--muted); border-right: 0; }
details.notes[open] > summary::before { border: 5px solid transparent; border-top: 7px solid var(--muted); border-bottom: 0; }
.notes-body { overflow-wrap: anywhere; padding: 2px 16px 14px 30px; font-size: .9rem; line-height: 1.5; max-width: 90ch; }
.notes-body h4 { margin: 14px 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink); font-weight: 600; }
.notes-body h4:first-child { margin-top: 6px; }
.notes-body p { margin: 6px 0; }
.notes-body ul { margin: 4px 0 8px; padding-left: 1.2rem; }
.notes-body li { margin: 0 0 8px; }
.notes-body li ul { margin-top: 6px; }
.notes-body li > p { margin: 6px 0 0; }
.notes-body strong { color: var(--ink); font-weight: 600; }
.notes-body code { font-family: var(--font-mono); font-size: .82em; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }
.notes-body pre { font-family: var(--font-mono); font-size: .8rem; background: var(--surface-2); padding: 8px 10px; border-radius: 6px; overflow-x: auto; white-space: pre; margin: 6px 0; }
/* "Previous releases (N)": a closed secondary button that opens the older versions, newest first */
details.older > summary { list-style: none; width: fit-content; user-select: none; }
details.older > summary::-webkit-details-marker { display: none; }
details.older > summary::before { content: ""; border: 5px solid transparent; border-left: 7px solid var(--muted); border-right: 0; }  /* drawn, not a glyph: the bundled fonts have no arrows */
details.older[open] > summary::before { border: 5px solid transparent; border-top: 7px solid var(--muted); border-bottom: 0; }
.older-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
/* "Release files: SBOM and checksums (N)": SBOMs and checksum lists, closed by default */
details.verif { border-top: 1px solid var(--line); }
details.verif > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .86rem; }
details.verif > summary:hover { color: var(--ink); }
details.verif .table-wrap { border-top: 1px solid var(--line); }
/* sub-folder heading inside a version's file table */
tr.folder th { background: var(--surface-2); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .86rem; border-top: 1px solid var(--line); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.fname { overflow-wrap: anywhere; min-width: 12ch; }
td.act { text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
td.keycell.keywrap { overflow-wrap: normal; min-width: 14ch; }  /* licence keys break at their dashes only */
td .time { display: block; font-size: .78rem; color: var(--muted); }
td .pill.stacked { display: table; margin: 4px 0 0 auto; }
td .pill.wrap { white-space: normal; text-align: center; max-width: 9rem; }
th .sub { display: block; font-size: .66rem; letter-spacing: .04em; text-transform: none; font-weight: 400; margin-top: 2px; }
td.fname .fn { display: block; }
td.fname .desc { display: block; margin-top: 1px; }
/* the whole SHA-256, wrapped; one click selects it for copying */
td.sha { min-width: 17rem; }  /* room for the hash on two lines (33 characters each) */
.sha-val { display: block; max-width: 33ch; word-break: break-all; color: var(--muted); font-size: .75rem; line-height: 1.35; user-select: all; }
.sha-label { display: none; }

/* forms */
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; }
input[type=text], input[type=password], input[type=email], input[type=date] {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; min-width: 0; width: 100%; }
input[type=date] { width: 10rem; }  /* room for the longest browser format (German TT.MM.JJJJ + calendar icon) */
input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.flash { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.flash.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.flash.err { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }

/* sign-in */
.login { max-width: 400px; margin: 10vh auto; padding: 0 16px; }
.login-card { gap: 16px; }
.login h1 { font-size: 1.45rem; text-align: center; }
.login-card > .muted { text-align: center; }
.login-logo { display: block; width: 220px; max-width: 100%; height: auto; margin: 4px auto 6px; }
.brand-mark img { display: block; width: 24px; height: auto; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form .btn { margin-top: 4px; }
.login-help { text-align: center; }

/* account pages */
.nav a[aria-current=page] { background: rgba(255,255,255,.1); }
.pill.p-warn { color: var(--warn); background: var(--warn-soft); } .pill.p-bad { color: var(--bad); background: var(--bad-soft); }
.pill.p-muted { color: var(--muted); background: var(--surface-2); }
.stack { display: flex; flex-direction: column; gap: 12px; max-width: 34rem; }
.stack.wide { max-width: 46rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.actions.filter-row { align-items: flex-end; }  /* the button lines up with the field, not with field + label */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.host-cell { overflow-wrap: anywhere; min-width: 12ch; }
.keycell { font-family: var(--font-mono); font-size: .85rem; user-select: all; overflow-wrap: anywhere; min-width: 16ch; }
textarea, select, input[type=file] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 10px; min-width: 0; width: 100%; }
textarea { min-height: 7rem; font-family: var(--font-mono); font-size: .82rem; }
.qr { background: #fff; padding: 8px; border-radius: 8px; width: fit-content; line-height: 0; }
.qr svg { width: 220px; height: 220px; }
.codes { font-family: var(--font-mono); columns: 2; column-gap: 28px; margin: 0; padding: 12px 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px; list-style: none; }
.secret { font-family: var(--font-mono); user-select: all; overflow-wrap: anywhere; }
.pager { display: flex; gap: 10px; align-items: center; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; align-content: start; }
  .side { position: static; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-right: 0; }
  .nav { overflow: visible; flex-direction: row; flex-wrap: wrap; } .nav .label { width: 100%; padding-bottom: 0; }
  .brand, .nav, .side-foot { order: 0; }
  .side-foot { margin-top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; }
  .content { padding: 18px 16px 40px; }
}
@media (max-width: 720px) {
  /* narrow: every file is a small card, the checksum stacked under the file name (table roles are set in the HTML) */
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); }
  tr.folder { display: block; padding: 0; }
  tr td, tr th { padding: 0; border-bottom: 0; }
  tr.folder th { display: block; padding: 7px 12px; }
  td.fname { grid-column: 1 / -1; }
  td.num { grid-column: 1; grid-row: 2; text-align: left; }
  td.act { grid-column: 2; grid-row: 2; }
  td.sha { grid-column: 1 / -1; min-width: 0; }
  .sha-label { display: block; }
  tr:last-child td { border-bottom: 0; }
}
@media print {
  .side { display: none; } .shell { display: block; }
}
@media (max-width: 720px) {  /* the card layout below is for file tables; data tables keep their columns and scroll */
  table.data { display: table; } table.data tbody { display: table-row-group; }
  table.data thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  table.data tr { display: table-row; } table.data tr td, table.data tr th { padding: 9px 12px; border-bottom: 1px solid var(--line); }
}
