/* CEVault: the look is 98.css (static/98/98.css, jdan/98.css, unchanged).
   This file is only layout, spacing and the few things 98.css has no class for. */

html { background: #008080; zoom: 1.5; }
/* Windows 98 drew its UI with the MS Sans Serif bitmap font at 11px. 98.css has a faithful copy of it, which
   only looks sharpest at whole-number scale (2 is crisp, 1.5 is a little soft). The zoom above is the one
   number to change if the page feels too big or too small. All sizes below are in 1x pixels. */
body { margin: 0; padding: 8px; min-height: 100vh; font: 11px/1.4 "Pixelated MS Sans Serif", Arial, sans-serif; -webkit-font-smoothing: none; }
/* Optional smooth font (status bar toggle, cookie "font=plain"). Same element list as 98.css's font rule,
   one class more specific so it wins. Arial is a touch bigger because it has no pixel grid to snap to. */
html.plain-font body,
html.plain-font .title-bar, html.plain-font .window, html.plain-font button, html.plain-font input,
html.plain-font label, html.plain-font legend, html.plain-font li[role=tab], html.plain-font option,
html.plain-font select, html.plain-font table, html.plain-font textarea, html.plain-font ul.tree-view {
  font-family: Arial, Helvetica, sans-serif; font-size: 12px; -webkit-font-smoothing: auto;
}
.window.site { max-width: 900px; margin: 0 auto; }
@media (max-width: 700px) { body { padding: 0; } }
code, code *, pre { font-family: "Courier New", monospace; font-size: 12px; }

/* 98.css sizes headings for posters; this is a content site */
h1 { font-size: 16px; margin: 0 0 8px; }
h2 { font-size: 13px; margin: 16px 0 6px; }
h3 { font-size: 11px; margin: 12px 0 4px; }
p, ul, ol { margin: 6px 0; }
ul, ol { padding-left: 20px; }
hr { margin: 12px 0; }
summary { cursor: pointer; }
details { margin: 6px 0; }
img { max-width: 100%; }

/* news posts: a small 98.css window each, the headline in its title bar */
.window.post { margin: 0 0 10px; }
.window.post .window-body { margin: 6px 8px 8px; }
.window.post p:first-child { margin-top: 0; }

/* top bar and device strip */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.bar a { color: inherit; }
.brand { text-decoration: none; font-size: 13px; }
.who { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
form.inline { display: inline; margin: 0; }
.device { flex-wrap: wrap; margin-bottom: 8px; }
.device select { min-width: 0; max-width: 320px; }
menu[role="tablist"] { flex-wrap: wrap; }
main.window-body { margin: 8px; }

/* text helpers */
.meta, .why, .hint { color: #555; }
.problem { color: #a00000; }
.description { white-space: pre-line; }
.icon { vertical-align: middle; }
.plain { list-style: none; padding: 0; }
.message { white-space: pre-wrap; }
.banner, .flash, .message, details.keygen-box { padding: 4px 8px; margin: 6px 0; background: #fff; }
.tag, .badge { padding: 0 4px; box-shadow: inset -1px -1px #dfdfdf, inset 1px 1px grey; }

/* lists of titles and facets */
.cards, .facets, .extras { list-style: none; padding: 0; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.cards li { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; background: #fff; }
/* The two boxes of the home page. */
.home-window { margin: 12px 0; }
.home-label { font-weight: bold; margin: 0 0 4px; }
.home-label ~ .home-cards { margin-bottom: 10px; }
.home-window .window-body > :last-child { margin-bottom: 0; }
/* The home page counts its cards in rows: 4 across (2 on a narrow screen). */
.home-cards .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .home-cards .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cards .shot { flex: 0 0 100%; }
.cards .shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.facets { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.extras li { margin-bottom: 10px; }
.extra-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.extra-head .why { margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.pager { display: flex; gap: 16px; margin: 12px 0; }
.shots { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; }
.shots img { max-height: 256px; width: auto; }
.review-shot { max-width: 100%; max-height: 480px; }
.release { margin-bottom: 16px; }

/* tables: 98.css gives the header bar and the white sunken frame (.sunken-panel); cells here may wrap */
table { width: 100%; white-space: normal; }
/* 98.css draws the sunken frame with border-image, which breaks up (lines vanish partway) at fractional zoom.
   The same bevel as plain box-shadows is solid at any zoom. */
.sunken-panel { border: 0; border-image: none; padding: 2px; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
/* 98.css makes the header row sticky; inside a zoomed scroll box that draws a ghost strip and shifts the header. */
.sunken-panel table > thead > tr > * { position: static; height: auto; padding: 2px 6px; }
.sunken-panel table > tbody > tr > * { height: auto; padding: 3px 6px; vertical-align: top; }
.sunken-panel table > tbody > tr + tr > * { border-top: 1px solid #dfdfdf; }
.sunken-panel table { margin: 0; }
table th.num, table td.num { text-align: right; white-space: nowrap; }
table.files td.file { min-width: 220px; word-break: break-word; }
table.files td.os, table.files td.cpu, table.serials td { white-space: nowrap; }
table.serials td:nth-child(3) { white-space: normal; min-width: 128px; }
code.serial { user-select: all; white-space: nowrap; }

/* forms */
form.stack, form.wide { display: flex; flex-direction: column; gap: 8px; }
form.stack { max-width: 240px; }
form.wide { max-width: 400px; }
form.stack label, form.wide label { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
form .field-row > label { display: inline-flex; flex-direction: row; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], select, textarea { max-width: 100%; }
form.stack input, form.wide input[type="text"], form.wide select, textarea { width: 100%; }
fieldset { margin: 0 0 12px; }
textarea { min-height: 80px; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
textarea.serials-box { font-family: monospace; }
pre.source { max-height: 28em; overflow: auto; white-space: pre; tab-size: 4; }

/* A button that looks like a link (Cancel in a table row). 98.css gives buttons a 23px minimum height and
   changes the box on :active, which made the row grow on click, so every state is pinned to one box. */
button.linkish, button.linkish:hover, button.linkish:focus, button.linkish:not(:disabled):active {
  background: none; box-shadow: none; padding: 0; margin: 0; min-width: 0; min-height: 0; height: auto;
  color: #00f; text-shadow: none; text-decoration: underline; cursor: pointer; font: inherit;
}
button.linkish:focus { outline: 1px dotted #00f; outline-offset: 1px; }

/* keygen box */
.keygen-output code { font-size: 13px; user-select: all; }
.keygen-output li { margin: 4px 0; }
.keygen-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
.keygen-form label { display: flex; flex-direction: column; }

/* upload form: hide the new-title boxes when "existing" is picked */
form:has(input[name="title_mode"][value="existing"]:checked) .newtitle { display: none; }

/* moderation queue */
.js-only { display: none; }
.js .js-only { display: inline-block; }
.queue-filter { flex-wrap: wrap; margin-bottom: 8px; }
.queue-filter input[type="search"] { width: 16em; }
.flag-buttons { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 6px 0 10px; }
.flag-button .count { color: #555; }
.flag-button.on { font-weight: bold; text-decoration: none; }
.flag-text { color: #555; }
.pager { margin: 6px 0; }
.ok { color: #006000; }
fieldset.bulkbar { position: sticky; top: 0; z-index: 2; background: #c0c0c0; margin-bottom: 8px; }
.bulkrow { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 3px 0; }
.bulkrow label { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; }
table.queue td.tick, table.queue th.tick { width: 1%; white-space: nowrap; }
table.queue tr.group > td { background: #e8e8e8; border-top: 1px solid #808080; }
table.queue tr.group .grouplinks { margin-left: 12px; }

/* 98.css hides every checkbox (opacity 0, position fixed) and draws a box on the label that follows it.
   Queue checkboxes have no label, so they were invisible. Here the input draws its own 98 style box. */
table.queue input[type="checkbox"], .tickbox input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; opacity: 1; position: static; margin: 0;
  width: 13px; height: 13px; display: inline-block; vertical-align: middle; cursor: pointer;
  background: #fff; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
table.queue input[type="checkbox"]:active, .tickbox input[type="checkbox"]:active { background-color: silver; }
table.queue input[type="checkbox"]:checked, .tickbox input[type="checkbox"]:checked {
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg width='7' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 0H6v1H5v1H4v1H3v1H2V3H1V2H0v3h1v1h1v1h1V6h1V5h1V4h1V3h1V0z' fill='%23000'/%3E%3C/svg%3E") 3px 3px no-repeat;
}
table.queue input[type="checkbox"]:focus-visible, .tickbox input[type="checkbox"]:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
/* a bigger click target: the whole tick cell */
table.queue td.tick { cursor: pointer; }

/* title (whole app) review */
.titlehead { background: #fff; padding: 4px 8px; margin: 6px 0; }
.titlehead dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; }
.titlehead dt { color: #555; }
.titlehead dd { margin: 0; }
.filebox { margin: 8px 0; padding: 4px 8px; background: #fff; }
.filebox + .filebox { margin-top: 6px; }
.filehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.filehead .tickbox { display: inline-flex; align-items: center; gap: 6px; }
.filehead .right { margin-left: auto; }
.filebox ul.contents { max-height: 14em; overflow: auto; margin: 2px 0; padding-left: 18px; }
.filebox .shotrow img { max-height: 200px; width: auto; margin-right: 6px; }
.bigapprove { font-weight: bold; }

/* the screenshots page for moderators */
.shot-list { padding: 0; }
.shot-list li { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; padding: 8px; margin-bottom: 8px; list-style: none; }
.shot-list img { max-height: 140px; max-width: 200px; width: auto; display: block; }
.shot-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.shot-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: flex-start; }
.shot-actions details { margin: 0; }
.shot-actions details form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.shot-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
