/*
 * Satellite Source Viewer -- the look.
 *
 * ONE WINDOW. The whole viewer is a single code window in the look of the site's
 * own syntax highlighter (wpshl): the navy background, the polygons picture under
 * a white veil, the blue edge down the left and along the bottom, white letters
 * with the raised black shadow, and the same colours for the parts of the code.
 * The title bar, the zip, LAST TESTED, the administrators' panel, the folder
 * listing and every open file are all drawn ON that one window: none of them has
 * a frame of its own, so nothing about it looks like a different program.
 *
 * WHAT HOLDS WHAT. The markup is written by includes/class-satsrc-plugin.php and
 * by the REST answers, and must match the spec's markup contract exactly:
 *
 *     .satsrc                         the frame: colour, picture, edge, corners
 *       .satsrc-bar                   the title, CLOSE ALL, FULL WINDOW
 *       .satsrc-repos                 THE CHOOSER, the first screen: one row per repository
 *       -- or, once one is chosen --
 *       .satsrc-view                  ONE REPOSITORY (viewer.js swaps the two)
 *         .satsrc-repo-bar            ALL REPOSITORIES | repo-7/ | CREATED ...
 *         .satsrc-zip                 full_source | zip | size | built | age | DOWNLOAD
 *         .satsrc-tested              LAST TESTED: ...
 *         .satsrc-admin               (administrators only)
 *         .satsrc-window              the listing; scrolls sideways when narrow
 *           .satsrc-head-row          NAME TYPE SIZE MODIFIED
 *           .satsrc-rootline          satellite/
 *           .satsrc-items             one .satsrc-item per entry
 *             .satsrc-item > .satsrc-row       a grid: name, type, size, date, actions
 *                          > .satsrc-items     a folder's own entries (viewer.js fills it)
 *                          > .satsrc-code      a file's code panel (viewer.js fills it)
 *
 * (A viewer without repositories -- the plugin's first version -- has the zip,
 * LAST TESTED, the panel and the listing straight in .satsrc; every rule below
 * works either way.)
 *
 * WHY EVERY NAME IS OUR OWN. wpshl's stylesheet is on every page of the site.
 * Every class here begins satsrc-, and the highlighted code says satsrc-line and
 * satsrc-tk-<part> where wpshl says wsh-line and wsh-<part>, so neither plugin
 * ever styles the other's windows, whichever of them is switched on.
 *
 * WHY "html body" AND !important. The theme (Hueman) and the site's own
 * satellite-posts.css have rules for every link, button, input, <code> and <pre>
 * inside a page -- underlines, a grey box, another font, wrapped lines -- and
 * several of them are more specific than a plain class. Only those properties
 * are pinned down, the way wpshl pins down the structure of its own box; the
 * colours are left to the custom properties.
 */

/* The palette: a copy of the live wpshl settings on satellite.foundation. */
.satsrc {
	--satsrc-bg: #000f30;
	--satsrc-veil: #ffffff;
	--satsrc-border: #36a5e4;
	--satsrc-text: #ffffff;
	--satsrc-shadow: #000000;
	--satsrc-comment: #8fb2d9;
	--satsrc-keyword: #ffffff;
	--satsrc-type: #a9d6ff;
	--satsrc-function: #dcefff;
	--satsrc-word: #dcefff;
	--satsrc-meta: #9ccaf2;
	--satsrc-string: #c4f0ff;
	--satsrc-number: #b9dcff;
	--satsrc-constant: #eaf6ff;
	--satsrc-variable: #cfe4fa;
	--satsrc-operator: #ffffff;
	--satsrc-punctuation: #ffffff;
	--satsrc-tab: 4;
	--satsrc-pad: 20px;
	--satsrc-edge: 3px;
	--satsrc-title-size: 22px;
	--satsrc-text-shadow: 0 0 .05em var(--satsrc-bg), 0 0 .09em var(--satsrc-bg), .07em .07em 0 var(--satsrc-shadow), .13em .13em 0 var(--satsrc-shadow), .18em .18em .05em var(--satsrc-shadow);
	--satsrc-keyword-weight: 700;
	--satsrc-image: url("../img/polygons.jpg");
	--satsrc-scrim: linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18));
	--satsrc-image-min: 630px;
	--satsrc-on-text: #000000;
	--satsrc-rule: rgba(255, 255, 255, 0.35);
	--satsrc-tint: rgba(255, 255, 255, 0.16);

	/* The viewer's own, beyond wpshl's palette. */
	--satsrc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
	--satsrc-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
	--satsrc-code-size: 15px;
	--satsrc-press: rgba(255, 255, 255, 0.34); /* a button under the pointer: wpshl's --wsh-tabs-hover */
	--satsrc-hover: rgba(255, 255, 255, 0.08); /* a row under the pointer */
	--satsrc-guide: rgba(255, 255, 255, 0.14); /* the faint lines that show which folder a row is in */
	--satsrc-num: 1.85em; /* room for the line numbers; viewer.js widens it for files of 10,000 lines or more */

	/*
	 * The listing's columns: name, then type, size, date and actions. The actions
	 * column never goes below the width of its widest content (VIEW + DOWNLOAD, or
	 * "too big to show" + DOWNLOAD), so that every row -- each one its own grid --
	 * has its columns in the same places whether it has buttons or not.
	 *
	 * Each level of folder pushes a name in by --satsrc-step, and that room is ADDED
	 * to the name's column rather than taken out of it: a name deep in the tree
	 * keeps --satsrc-name-min to itself, and on a narrow screen the listing scrolls
	 * sideways instead of squeezing the name to a letter a line.
	 */
	--satsrc-step: 1.5em;
	--satsrc-icon: 1.6em; /* the arrow or mark before each name */
	--satsrc-name-min: 16em;
	--satsrc-cols: 6em 8em 10.5em minmax(12.5em, max-content);
	--satsrc-gap: 1em;
	/* Below this width (about 895px: it fits the page's column even with the theme's
	   two sidebars) the listing scrolls sideways instead of squashing its columns.
	   On a screen narrower than 940px the MODIFIED column goes instead (TABLETS, below). */
	--satsrc-row-min: calc(var(--satsrc-name-min) + 37em + 4 * var(--satsrc-gap) + 2 * var(--satsrc-pad));

	/*
	 * The chooser's columns, the same way: the name, then CREATED (the longest
	 * date, "Sep. 22nd, 2026", is 15 letters), the zip's size, LAST TESTED (a date
	 * and its PASSED or FAILED) and OPEN. Every row is its own grid, so the
	 * columns have fixed widths, and line up from row to row. Unlike a file's
	 * name, a repository's is short, and its date is what the chooser is for: the
	 * name's column stops growing at --satsrc-repo-name-max, so the dates stay
	 * beside the names on a wide screen, and OPEN follows them.
	 */
	--satsrc-repo-name-min: 13em;
	--satsrc-repo-name-max: 24em;
	--satsrc-repo-cols: 9.6em 9em 14em minmax(5em, 1fr);
	--satsrc-repo-min: calc(var(--satsrc-repo-name-min) + 37.6em + 4 * var(--satsrc-gap) + 2 * var(--satsrc-pad));
}

/*
 * THE FRAME. As in wpshl: two background layers over the colour, the veil on top
 * and the picture under it, the picture as wide as the frame (never narrower than
 * --satsrc-image-min) and pinned to the BOTTOM. A viewer taller than the picture
 * shows the background colour above it, into which the picture's own dark top
 * edge fades. The frame itself never scrolls (except in FULL WINDOW), so the
 * picture stays still while things open and close over it.
 */
html body .satsrc {
	/* flow-root: the margins of the parts inside stay inside the window's edge */
	display: flow-root;
	position: relative;
	box-sizing: border-box;
	clear: both;
	margin: 0 0 20px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	/* !important: the theme gives a full-width block a white background of its own */
	background-color: var(--satsrc-bg) !important;
	background-image: var(--satsrc-scrim), var(--satsrc-image);
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: 100% 100%, max(100%, var(--satsrc-image-min)) auto;
	color: var(--satsrc-text);
	text-shadow: var(--satsrc-text-shadow);
	/* The window's edge: down the left and along the bottom only, so that it seems
	   to stand out of the page. A hard shadow rather than a border, because a border
	   on two sides of a rounded box tapers away to nothing at its corners. */
	box-shadow: calc(var(--satsrc-edge) * -1) var(--satsrc-edge) 0 0 var(--satsrc-border);
	/* Sizes of our own: the theme's line height is in em of ITS font size, and would
	   arrive here as a fixed number of pixels. */
	font-size: 16px;
	line-height: 1.45;
	text-align: left;
	direction: ltr;
	overflow-wrap: normal;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

html body .satsrc *,
html body .satsrc *::before,
html body .satsrc *::after {
	box-sizing: border-box;
}

/* Hidden means hidden, whatever a theme says about a <div> or a <pre>. */
html body .satsrc [hidden] {
	display: none !important;
}

/*
 * THE THEME'S RULES, UNDONE. Hueman underlines every link in a post and colours
 * it; it puts <code> in a grey box in another font, and gives <pre> a striped
 * background, a border, margins and wrapped lines; satellite-posts.css changes
 * the font of both. Inside the viewer, <code> is only a marker: it takes
 * everything from what it is in.
 */
html body .satsrc a,
html body .satsrc a:hover,
html body .satsrc a:focus,
html body .satsrc a:active,
html body .satsrc a:visited {
	border-bottom: 0;
	text-decoration: none !important;
	box-shadow: none;
}

/*
 * Words that ARE links -- "Setup check: Settings > Satellite Source" in the
 * administrators' messages -- are the light blue of a type in the code, and
 * underlined, so they can be told from the words around them; white under the
 * pointer. (The theme would make them teal, and dark grey under the pointer:
 * invisible on navy.) Links that look like buttons are left to the buttons' rules.
 */
html body .satsrc a:not(.satsrc-btn),
html body .satsrc a:not(.satsrc-btn):visited {
	color: var(--satsrc-type);
	text-decoration: underline !important;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

html body .satsrc a:not(.satsrc-btn):hover,
html body .satsrc a:not(.satsrc-btn):focus {
	color: var(--satsrc-text);
}

html body .satsrc a:not(.satsrc-btn):focus-visible {
	outline: 2px solid var(--satsrc-text);
	outline-offset: 2px;
}

html body .satsrc code {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: inherit !important;
	font: inherit !important;
	letter-spacing: inherit;
	text-shadow: inherit;
	vertical-align: baseline;
}

html body .satsrc pre {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0;
	background: none !important;
	box-shadow: none !important;
	color: inherit;
	font-family: var(--satsrc-mono) !important;
	line-height: 1.55 !important;
	text-shadow: inherit;
	overflow: visible !important;
	white-space: pre !important;
	word-wrap: normal !important;
	overflow-wrap: normal !important;
}

/* Generic resets for every <button> in the viewer: the browser's own grey box and the theme's fills go. */
html body .satsrc button {
	-webkit-appearance: none;
	appearance: none;
	min-width: 0;
	min-height: 0;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	letter-spacing: inherit;
	text-transform: none;
	text-shadow: inherit;
	cursor: pointer;
}

/*
 * BUTTONS. Like wpshl's COPY TO CLIPBOARD: the text colour inside a border of the
 * same, on nothing, in small capitals. !important throughout, as in wpshl:
 * themes style every link and every <button> in a post -- Hueman fills a submit
 * button with its own teal -- and a button that takes on the theme's look is not
 * part of the window any more.
 */
html body .satsrc .satsrc-btn,
html body .satsrc .satsrc-btn:visited {
	display: inline-block !important;
	position: relative;
	width: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0.3em 0.85em !important;
	border: 1px solid var(--satsrc-text) !important;
	border-radius: 4px !important;
	background: transparent !important;
	color: var(--satsrc-text) !important;
	font-family: var(--satsrc-ui) !important;
	font-size: 0.75em !important;
	font-style: normal !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.06em !important;
	text-align: center !important;
	text-decoration: none !important;
	text-indent: 0 !important;
	text-transform: uppercase !important;
	text-shadow: inherit;
	white-space: nowrap !important;
	vertical-align: middle;
	box-shadow: none !important;
	opacity: 1 !important;
	cursor: pointer;
	transition: background-color 0.12s ease;
	-webkit-user-select: none;
	user-select: none;
}

html body .satsrc .satsrc-btn:hover,
html body .satsrc .satsrc-btn:focus {
	background: var(--satsrc-press) !important;
	color: var(--satsrc-text) !important;
	text-decoration: none !important;
}

html body .satsrc .satsrc-btn:focus-visible {
	outline: 2px solid var(--satsrc-text);
	outline-offset: 2px;
}

html body .satsrc .satsrc-btn:disabled,
html body .satsrc .satsrc-btn[aria-disabled="true"] {
	background: transparent !important;
	opacity: 0.6 !important;
	cursor: progress;
}

/*
 * DOWNLOAD, where it is the main thing to press -- the zip, and an open file --
 * is wpshl's Download: a slab of the text colour, its words in --satsrc-on-text,
 * which stands out from it. In the listing's rows it stays an outline like the
 * other buttons: a column of white slabs down every row would shout.
 */
html body .satsrc .satsrc-zip-download,
html body .satsrc .satsrc-zip-download:visited,
html body .satsrc .satsrc-code-head .satsrc-download,
html body .satsrc .satsrc-code-head .satsrc-download:visited {
	padding: 0.35em 1em !important;
	border-color: var(--satsrc-text) !important;
	border-radius: 999px !important;
	background: var(--satsrc-text) !important;
	color: var(--satsrc-on-text) !important;
	text-shadow: none !important;
}

html body .satsrc .satsrc-zip-download:hover,
html body .satsrc .satsrc-zip-download:focus,
html body .satsrc .satsrc-code-head .satsrc-download:hover,
html body .satsrc .satsrc-code-head .satsrc-download:focus {
	background: var(--satsrc-text) !important;
	color: var(--satsrc-on-text) !important;
	opacity: 0.85 !important;
}

/* the little arrow wpshl puts before "Download"; drawn here, so screen readers say only DOWNLOAD */
html body .satsrc .satsrc-zip-download::before,
html body .satsrc .satsrc-code-head .satsrc-download::before {
	content: "\2193\00a0";
	content: "\2193\00a0" / "";
}

/*
 * Buttons that only work with viewer.js are not shown until it has run and
 * marked the viewer (.satsrc-js): nobody is offered a button that does nothing.
 * The DOWNLOAD links are plain links and always work.
 */
html body .satsrc:not(.satsrc-js) .satsrc-closeall,
html body .satsrc:not(.satsrc-js) .satsrc-full,
html body .satsrc:not(.satsrc-js) .satsrc-btn.satsrc-view,
html body .satsrc:not(.satsrc-js) .satsrc-copy,
html body .satsrc:not(.satsrc-js) .satsrc-close,
html body .satsrc:not(.satsrc-js) .satsrc-rebuild {
	display: none !important;
}

/* (`.satsrc-btn.satsrc-view`, not `.satsrc-view`: that is also the class of a whole
   repository's view, which must show with or without the script. The chooser's
   links and ALL REPOSITORIES are plain links, and always work.) */

/* On the chooser there is nothing to close. */
html body .satsrc.satsrc-choosing .satsrc-closeall {
	display: none !important;
}

/*
 * THE TITLE BAR: wpshl's header. No band of colour and no line under it: the
 * title is simply the top of the window. The words are in the site's own font;
 * only code and file names are monospace.
 */
.satsrc .satsrc-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1em;
	padding: var(--satsrc-pad) var(--satsrc-pad) 0.7em;
	line-height: 1.35;
}

.satsrc .satsrc-title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: var(--satsrc-title-size);
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.satsrc .satsrc-bar-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 0.5em 0.8em;
	margin-left: auto;
}

/*
 * THE REPOSITORY CHOOSER: the first screen. One row per repository, drawn as
 * the listing draws its rows -- the same grid, the same monospace, the same
 * colours for the same kinds of thing: a name like a folder, a date like a
 * comment, a size like a number -- under a heading in the window's own words, so
 * that it is one more part of the same window, not a menu put on top of it.
 * Like the listing, it scrolls sideways rather than squeeze its columns.
 */
.satsrc .satsrc-repos {
	position: relative;
	padding: 0 0 calc(var(--satsrc-pad) * 0.75);
	overflow-x: auto;
	overflow-y: hidden;
	font-size: var(--satsrc-code-size);
	line-height: 1.55;
}

/* CHOOSE A REPOSITORY: wpshl's title, a size down, under the window's own title. */
.satsrc .satsrc-repos-title {
	padding: 0.1em var(--satsrc-pad) 0.55em;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.satsrc .satsrc-repos > .satsrc-head-row,
.satsrc .satsrc-repo > .satsrc-row {
	grid-template-columns: minmax(var(--satsrc-repo-name-min), var(--satsrc-repo-name-max)) var(--satsrc-repo-cols);
	min-width: var(--satsrc-repo-min);
}

/* OPEN straight after LAST TESTED (the listing's buttons keep to the right edge) */
.satsrc .satsrc-repo > .satsrc-row > .satsrc-actions {
	justify-content: flex-start;
}

/* a little more room per row than the listing's: these are choices, not a long list */
.satsrc .satsrc-repo > .satsrc-row {
	min-height: 2.3em;
	padding-top: 0.25em;
	padding-bottom: 0.25em;
}

.satsrc .satsrc-repo-list {
	font-family: var(--satsrc-mono);
}

/* the name: a link to the repository, the colour of a folder, in bold */
html body .satsrc .satsrc-repo-row > a.satsrc-name,
html body .satsrc .satsrc-repo-row > a.satsrc-name:visited {
	color: var(--satsrc-type);
	font-weight: 700;
	text-decoration: none !important;
}

/* under the pointer, or reached with the keyboard: white and underlined (not merely
   because it was clicked, which leaves the focus on it) */
html body .satsrc .satsrc-repo-row > a.satsrc-name:hover,
html body .satsrc .satsrc-repo-row > a.satsrc-name:focus-visible {
	color: var(--satsrc-text);
	text-decoration: underline !important;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

html body .satsrc .satsrc-repo-row > a.satsrc-name:focus:not(:hover):not(:focus-visible) {
	color: var(--satsrc-type);
	text-decoration: none !important;
}

html body .satsrc .satsrc-repo-row > a.satsrc-name:focus-visible {
	outline: 2px solid var(--satsrc-text);
	outline-offset: 1px;
	border-radius: 2px;
}

.satsrc .satsrc-repo-row > .satsrc-created,
.satsrc .satsrc-repo-row > .satsrc-repo-zip,
.satsrc .satsrc-repo-row > .satsrc-repo-tested {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.satsrc .satsrc-repo-row > .satsrc-created {
	color: var(--satsrc-comment);
}

.satsrc .satsrc-repo-row > .satsrc-repo-zip {
	color: var(--satsrc-number);
}

/* PASSED / FAILED: the LAST TESTED chips, small enough to sit in a row */
.satsrc .satsrc-repo-row .satsrc-result {
	margin-left: 0.4em;
	padding: 0 5px;
	font-size: 0.8em;
	line-height: 1.45;
	vertical-align: 0.06em;
}

/* no repository at all: no headings over nothing (the message below says why) */
.satsrc .satsrc-repos:has(> .satsrc-repo-list:empty) > .satsrc-head-row {
	display: none;
}

/* (administrators only) where the repositories are looked for; and, when there is none, why */
.satsrc .satsrc-repo-note {
	margin: 0.75em var(--satsrc-pad) 0;
	padding: 0.45em 0.85em;
	border: 1px dashed rgba(255, 255, 255, 0.45);
	border-radius: 6px;
	background: rgba(0, 10, 32, 0.45);
	font-size: 13px;
	font-style: italic;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

/* while a repository is being fetched */
.satsrc .satsrc-repo.satsrc-loading > .satsrc-row {
	cursor: progress;
}

.satsrc .satsrc-repo.satsrc-loading > .satsrc-row .satsrc-icon {
	animation: satsrc-pulse 0.9s ease-in-out infinite alternate;
}

/* a repository that could not be opened says why, under its row, as a folder does */
.satsrc .satsrc-repos .satsrc-errorrow > .satsrc-row {
	min-width: var(--satsrc-repo-min);
}

/*
 * ONE REPOSITORY: its own bar first -- the way back to the chooser, then the
 * repository's name and when it was created, each set off by an upright hairline
 * (the rule between line numbers and code) -- then everything as it ever was.
 */
.satsrc .satsrc-repo-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 0;
	margin: 0 var(--satsrc-pad) 0.8em;
	line-height: 1.35;
}

.satsrc .satsrc-repo-bar > .satsrc-repo-name::before,
.satsrc .satsrc-repo-bar > .satsrc-created::before {
	content: "";
	display: inline-block;
	width: 1px;
	height: 22px;
	margin: 0 15px;
	background: var(--satsrc-rule);
	vertical-align: middle;
}

.satsrc .satsrc-repo-name {
	color: var(--satsrc-type);
	font-family: var(--satsrc-mono);
	font-size: 17px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

/* CREATED in the headings' small capitals; the date itself as the name is drawn */
.satsrc .satsrc-repo-bar > .satsrc-created {
	color: var(--satsrc-comment);
	font-family: var(--satsrc-ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	white-space: nowrap;
}

.satsrc .satsrc-repo-bar > .satsrc-created > time {
	margin-left: 0.25em;
	color: var(--satsrc-text);
	font-family: var(--satsrc-mono);
	font-size: 15px;
	letter-spacing: normal;
	vertical-align: -0.05em;
}

/* while the chooser is being fetched */
html body .satsrc .satsrc-back.satsrc-loading {
	opacity: 0.6 !important;
	cursor: progress;
}

/* what went wrong on the way back (the website could not be reached) */
.satsrc .satsrc-view > .satsrc-errorrow {
	margin: -0.3em 0 0.6em;
}

.satsrc .satsrc-view > .satsrc-errorrow > .satsrc-row {
	min-width: 0;
}

/*
 * THE ZIP: the first thing in the window after the title, on a band of the
 * window's own tint (what wpshl lays under a language's name), so that it reads
 * as the one item that is not part of the folder below.
 */
.satsrc .satsrc-zip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em 1.1em;
	margin: 0 var(--satsrc-pad) 0.75em;
	padding: 0.55em 0.95em;
	border-radius: 6px;
	background: var(--satsrc-tint);
	font-size: 15px;
	line-height: 1.4;
}

.satsrc .satsrc-zip-name {
	font-family: var(--satsrc-mono);
	font-size: 17px;
	font-weight: 700;
}

.satsrc .satsrc-zip .satsrc-type {
	padding: 0 0.45em;
	border: 1px solid var(--satsrc-rule);
	border-radius: 3px;
	color: var(--satsrc-meta);
	font-family: var(--satsrc-mono);
	font-size: 0.85em;
	letter-spacing: 0.04em;
}

.satsrc .satsrc-zip .satsrc-size {
	color: var(--satsrc-number);
	font-weight: 700;
	white-space: nowrap;
}

.satsrc .satsrc-zip-date {
	white-space: nowrap;
}

.satsrc .satsrc-zip-age {
	color: var(--satsrc-comment);
	font-style: italic;
	white-space: nowrap;
}

/* the DOWNLOAD button stands at the far right of the band */
.satsrc .satsrc-zip .satsrc-zip-download {
	margin-left: auto !important;
}

/* not built yet: only the words, quieter */
.satsrc .satsrc-zip[data-state="missing"] .satsrc-size {
	color: var(--satsrc-comment);
	font-style: italic;
	font-weight: 400;
}

/*
 * LAST TESTED, with the site's own dark red label (the TITLE / DATE / TAGS labels
 * of the front page's heading boxes), and a PASSED or FAILED chip made the same way.
 */
.satsrc .satsrc-tested {
	padding: 0 var(--satsrc-pad) 0.85em;
	font-size: 15px;
	line-height: 1.75;
}

.satsrc .satsrc-label,
.satsrc .satsrc-result {
	display: inline-block;
	padding: 0 6px;
	color: #ffffff;
	font-weight: 700;
	line-height: 1.45;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

.satsrc .satsrc-label {
	background: #a63c3c;
	text-shadow: -2px 2px 1px #6e4242;
}

.satsrc .satsrc-tested-date {
	font-weight: 700;
	white-space: nowrap;
}

.satsrc .satsrc-result-passed {
	background: #2f7d43;
	text-shadow: -2px 2px 1px #1c4a28;
}

.satsrc .satsrc-result-failed {
	background: #c0392b;
	text-shadow: -2px 2px 1px #6e2018;
}

.satsrc .satsrc-tested-note {
	color: var(--satsrc-function);
	font-style: italic;
	overflow-wrap: anywhere;
}

/*
 * THE ADMINISTRATORS' PANEL. Marked off by a dashed line and a darker floor, as
 * something the public never sees; on the window all the same, in its colours.
 */
.satsrc .satsrc-admin {
	margin: 0 var(--satsrc-pad) var(--satsrc-pad);
	padding: 0.85em 1em 0.7em;
	border: 1px dashed rgba(255, 255, 255, 0.45);
	border-radius: 6px;
	background: rgba(0, 10, 32, 0.45);
	font-size: 14px;
	line-height: 1.45;
}

.satsrc .satsrc-admin-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em 1em;
}

.satsrc .satsrc-admin-status {
	flex: 1 1 16em;
	min-width: 0;
	overflow-wrap: anywhere;
}

.satsrc .satsrc-admin-status .satsrc-elapsed {
	margin-left: 0.4em;
	color: var(--satsrc-comment);
	font-family: var(--satsrc-mono);
	font-variant-numeric: tabular-nums;
}

/* the panel's words are smaller than the window's; its buttons need not be */
html body .satsrc .satsrc-admin .satsrc-btn {
	font-size: 0.82em !important;
}

/* REBUILD is the one button that changes something: the window's edge colour, filled, like wpshl's NEW TAB */
html body .satsrc .satsrc-admin .satsrc-rebuild {
	font-size: 0.9em !important;
}

html body .satsrc .satsrc-rebuild {
	padding: 0.45em 1.1em !important;
	border-color: var(--satsrc-border) !important;
	background: var(--satsrc-border) !important;
	color: var(--satsrc-bg) !important;
	font-weight: 700 !important;
	text-shadow: none !important;
}

html body .satsrc .satsrc-rebuild:hover,
html body .satsrc .satsrc-rebuild:focus {
	background: var(--satsrc-border) !important;
	color: var(--satsrc-bg) !important;
	filter: brightness(1.15);
}

html body .satsrc .satsrc-rebuild:disabled {
	background: var(--satsrc-border) !important;
	filter: none;
}

.satsrc .satsrc-tested-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em 1.2em;
	margin: 0.85em 0 0;
	padding: 0;
}

html body .satsrc .satsrc-tested-form label {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3em 0.5em;
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 0.85em;
	font-weight: 700;
	letter-spacing: 0.05em;
}

/*
 * The form's fields. The theme makes a text box a white block with a grey border
 * and takes away the arrow of a <select>; here they are dark fields on the
 * window, and `color-scheme: dark` asks the browser for a dark date picker too.
 */
html body .satsrc .satsrc-tested-form input,
html body .satsrc .satsrc-tested-form select {
	display: inline-block !important;
	width: auto;
	max-width: 100%;
	min-height: 2.15em;
	margin: 0 !important;
	padding: 0.25em 0.5em !important;
	border: 1px solid rgba(255, 255, 255, 0.55) !important;
	border-radius: 4px !important;
	background: rgba(0, 8, 28, 0.6) !important;
	color: var(--satsrc-text) !important;
	font-family: inherit;
	font-size: 14px !important;
	font-weight: 400;
	line-height: 1.3 !important;
	letter-spacing: normal;
	text-shadow: none !important;
	box-shadow: none !important;
	color-scheme: dark;
	vertical-align: middle;
}

html body .satsrc .satsrc-tested-form select,
html body .satsrc .satsrc-tested-form input[type="date"] {
	-webkit-appearance: auto;
	appearance: auto;
}

html body .satsrc .satsrc-tested-form input[type="text"] {
	width: 20em;
}

html body .satsrc .satsrc-tested-form option {
	background: var(--satsrc-bg);
	color: var(--satsrc-text);
}

html body .satsrc .satsrc-tested-form input:focus,
html body .satsrc .satsrc-tested-form select:focus {
	border-color: var(--satsrc-border) !important;
	outline: 2px solid var(--satsrc-border);
	outline-offset: 0;
	color: var(--satsrc-text) !important;
	box-shadow: none !important;
}

.satsrc .satsrc-form-status {
	min-width: 0;
	font-style: italic;
}

/* what the rebuild printed: monospace, wrapped (it is read, not copied as code), and it scrolls */
html body .satsrc pre.satsrc-log {
	max-height: 22em;
	margin: 0.85em 0 0 !important;
	padding: 0.6em 0.8em !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.35) !important;
	font-size: 12.5px;
	line-height: 1.5 !important;
	overflow: auto !important;
	white-space: pre-wrap !important;
	overflow-wrap: anywhere !important;
	tab-size: var(--satsrc-tab);
}

.satsrc .satsrc-admin-note {
	display: block;
	margin-top: 0.65em;
	font-size: 0.82em;
	font-style: italic;
	text-align: right;
	opacity: 0.85;
}

/*
 * THE LISTING. Like a long line of code, it goes sideways rather than being
 * squeezed: below --satsrc-row-min it scrolls. It is also a size container,
 * so that an open file's panel can be exactly as wide as the part of the
 * listing that can be seen (100cqw, below).
 *
 * It is a grid of ONE column, as wide as the window or as its widest row,
 * whichever is wider: the heading row, the root's line and the rows all
 * stretch to that one width, so the headings stay over their columns however
 * deep the open folders go (a deep row is wider than the window).
 */
.satsrc .satsrc-window {
	display: grid;
	grid-template-columns: minmax(min-content, 1fr);
	position: relative;
	padding: 0 0 calc(var(--satsrc-pad) * 0.75);
	overflow-x: auto;
	overflow-y: hidden;
	container-type: inline-size;
	font-family: var(--satsrc-mono);
	font-size: var(--satsrc-code-size);
	line-height: 1.55;
}

/* the head row and the root's line are never narrower than a row needs */
.satsrc .satsrc-window > .satsrc-head-row,
.satsrc .satsrc-window > .satsrc-rootline {
	min-width: var(--satsrc-row-min);
}

/*
 * A list of entries is as wide as the window, or as its widest row needs (a row
 * deep in the tree needs more), whichever is wider -- and so is the window's one
 * column (above). So every row, and every open file's panel, spans the whole
 * width the listing scrolls over -- which is what lets a panel stay in view
 * (sticky) however far the listing is scrolled sideways.
 */
.satsrc .satsrc-items {
	width: min-content;
	min-width: 100%;
}

.satsrc .satsrc-head-row,
.satsrc .satsrc-row {
	display: grid;
	grid-template-columns: minmax(calc(var(--satsrc-name-min) + var(--satsrc-depth, 0) * var(--satsrc-step)), 1fr) var(--satsrc-cols);
	column-gap: var(--satsrc-gap);
	align-items: center;
	padding: 0.14em var(--satsrc-pad);
}

/* The headings: small capitals over each column. Only the words shrink; the
   columns are in the row's own em, so they line up with the rows below. */
.satsrc .satsrc-head-row {
	padding-top: 0.2em;
	padding-bottom: 0.25em;
	border-bottom: 1px solid var(--satsrc-rule);
	-webkit-user-select: none;
	user-select: none;
}

.satsrc .satsrc-head-row > span {
	color: var(--satsrc-comment);
	font-family: var(--satsrc-ui);
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.12em;
}

/* NAME over the names, past the arrows (the heading's letters are 0.72 the size of the row's) */
.satsrc .satsrc-head-row > .satsrc-name {
	padding-left: calc(var(--satsrc-icon) / 0.72);
}

.satsrc .satsrc-rootline {
	padding: 0.45em var(--satsrc-pad) 0.15em;
	color: var(--satsrc-type);
	font-weight: 700;
}

.satsrc .satsrc-rootline code::before {
	content: "\25BE\00a0";
	content: "\25BE\00a0" / "";
	display: inline-block;
	width: var(--satsrc-icon);
	text-align: left;
	opacity: 0.85;
}

/*
 * A ROW. The name is pushed in by its depth, and faint upright lines (one per
 * folder it is inside) run down through the rows in that space, under each
 * folder's arrow, so that a deep folder's files can be seen to belong to it.
 */
.satsrc .satsrc-row {
	min-height: 1.95em;
	min-width: calc(var(--satsrc-row-min) + var(--satsrc-depth, 0) * var(--satsrc-step));
	background-image: repeating-linear-gradient(to right, transparent 0 0.62em, var(--satsrc-guide) 0.62em calc(0.62em + 1px), transparent calc(0.62em + 1px) var(--satsrc-step));
	background-repeat: no-repeat;
	background-position: var(--satsrc-pad) 0;
	background-size: calc(var(--satsrc-depth, 0) * var(--satsrc-step)) 100%;
	transition: background-color 0.1s ease;
}

.satsrc .satsrc-row:hover {
	background-color: var(--satsrc-hover);
}

/* the name: a button for a folder or a text file, a plain <span> for anything else */
html body .satsrc .satsrc-row > .satsrc-name {
	display: flex;
	align-items: baseline;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 0.05em 0 0.05em calc(var(--satsrc-depth, 0) * var(--satsrc-step));
	border: 0;
	background: none;
	color: var(--satsrc-text);
	font: inherit;
	line-height: inherit;
	text-align: left;
	text-decoration: none;
	overflow-wrap: anywhere;
}

html body .satsrc .satsrc-row > button.satsrc-name {
	cursor: pointer;
}

html body .satsrc .satsrc-row > button.satsrc-name:focus-visible {
	outline: 2px solid var(--satsrc-text);
	outline-offset: 1px;
	border-radius: 2px;
}

.satsrc .satsrc-name > code {
	min-width: 0;
}

.satsrc .satsrc-icon {
	flex: 0 0 auto;
	display: inline-block;
	width: var(--satsrc-icon);
	padding-left: 0.12em;
	text-align: left;
	opacity: 0.9;
	-webkit-user-select: none;
	user-select: none;
}

/* folders: the colour of a type in the code */
html body .satsrc .satsrc-dir > .satsrc-row > .satsrc-name {
	color: var(--satsrc-type);
}

.satsrc .satsrc-dir.satsrc-is-open > .satsrc-row > .satsrc-name {
	font-weight: 700;
}

/* files that cannot be shown here (pictures, programs, very big files): quieter, and not a button */
html body .satsrc .satsrc-binary > .satsrc-row > .satsrc-name,
html body .satsrc .satsrc-big > .satsrc-row > .satsrc-name,
html body .satsrc .satsrc-noaccess > .satsrc-row > .satsrc-name {
	color: var(--satsrc-comment);
}

.satsrc .satsrc-text > .satsrc-row .satsrc-icon {
	color: var(--satsrc-comment);
}

/* a link to somewhere else in the folder: an arrow after its name, as `ls -l` would show */
.satsrc .satsrc-link > .satsrc-row > .satsrc-name > code::after {
	content: "\00a0\2192";
	content: "\00a0\2192" / "";
	color: var(--satsrc-comment);
}

/* the other columns: a type like code's meta, a size like a number, a date like a comment */
.satsrc .satsrc-row > .satsrc-type {
	color: var(--satsrc-meta);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.satsrc .satsrc-dir > .satsrc-row > .satsrc-type {
	color: var(--satsrc-type);
}

.satsrc .satsrc-binary > .satsrc-row > .satsrc-type,
.satsrc .satsrc-noaccess > .satsrc-row > .satsrc-type {
	color: var(--satsrc-comment);
	font-style: italic;
}

.satsrc .satsrc-row > .satsrc-size,
.satsrc .satsrc-head-row > .satsrc-size {
	text-align: right;
	white-space: nowrap;
}

.satsrc .satsrc-row > .satsrc-size {
	color: var(--satsrc-number);
	font-variant-numeric: tabular-nums;
}

.satsrc .satsrc-row > .satsrc-date {
	color: var(--satsrc-comment);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.satsrc .satsrc-row > .satsrc-actions {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-end;
	align-items: center;
	gap: 0.55em;
	min-width: 0;
	white-space: nowrap;
}

.satsrc .satsrc-row .satsrc-note {
	color: var(--satsrc-comment);
	font-family: var(--satsrc-ui);
	font-size: 0.78em;
	font-style: italic;
}

/* an open file: its row stays lit, so that the code below it can be seen to be its own */
.satsrc .satsrc-file.satsrc-is-open > .satsrc-row {
	background-color: var(--satsrc-hover);
}

html body .satsrc .satsrc-file.satsrc-is-open > .satsrc-row .satsrc-btn.satsrc-view {
	background: var(--satsrc-press) !important;
}

/* while a folder or file is being fetched */
.satsrc .satsrc-item.satsrc-loading > .satsrc-row {
	cursor: progress;
}

.satsrc .satsrc-item.satsrc-loading > .satsrc-row .satsrc-icon {
	animation: satsrc-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes satsrc-pulse {
	from {
		opacity: 1;
	}
	to {
		opacity: 0.2;
	}
}

/* rows that are only words: an empty folder, "N more not shown", and what went wrong */
.satsrc .satsrc-empty > .satsrc-row > .satsrc-name,
.satsrc .satsrc-more > .satsrc-row > .satsrc-name,
.satsrc .satsrc-errorrow > .satsrc-row > .satsrc-name {
	grid-column: 1 / -1;
}

html body .satsrc .satsrc-empty > .satsrc-row > .satsrc-name,
html body .satsrc .satsrc-more > .satsrc-row > .satsrc-name {
	color: var(--satsrc-comment);
	font-style: italic;
	padding-left: calc(var(--satsrc-depth, 0) * var(--satsrc-step) + var(--satsrc-icon));
}

html body .satsrc .satsrc-errorrow > .satsrc-row > .satsrc-name {
	color: #ffd9d9;
	padding-left: calc(var(--satsrc-depth, 0) * var(--satsrc-step) + var(--satsrc-icon));
	font-family: var(--satsrc-ui);
	font-weight: 600;
	overflow-wrap: anywhere;
}

html body .satsrc .satsrc-errorrow > .satsrc-row > .satsrc-name::before {
	content: "!";
	display: inline-block;
	flex: 0 0 auto;
	width: 1.25em;
	height: 1.25em;
	margin: 0 0.5em 0 calc(var(--satsrc-icon) * -1);
	border-radius: 50%;
	background: #c0392b;
	color: #ffffff;
	font-weight: 700;
	line-height: 1.25em;
	text-align: center;
	text-shadow: none;
}

/* Room under a sticky page header (the theme's top bar, the admin bar) whenever the
   viewer or an entry in it is scrolled to: a #satsrc= link, CLOSE ALL, FULL WINDOW. */
html body .satsrc,
.satsrc .satsrc-item,
.satsrc .satsrc-repo {
	scroll-margin-top: 100px;
}

/*
 * AN OPEN FILE. Its panel is part of the window: no frame of its own, only a
 * hairline above and below. It is exactly as wide as the part of the listing
 * that can be seen (100cqw), and it stays in view when the listing is scrolled
 * sideways (sticky), so its own code can scroll sideways inside it.
 */
.satsrc .satsrc-code {
	position: sticky;
	left: 0;
	width: auto;
	width: 100cqw;
	margin: 0.35em 0 0.75em;
	border-top: 1px solid var(--satsrc-rule);
	border-bottom: 1px solid var(--satsrc-rule);
}

.satsrc .satsrc-code-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45em 1.1em;
	padding: 0.75em var(--satsrc-pad) 0.15em;
	line-height: 1.35;
}

.satsrc .satsrc-code-path {
	flex: 0 1 auto;
	min-width: 0;
	font-size: 17px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

/* the language and the size: wpshl's language name */
.satsrc .satsrc-code-meta {
	font-family: var(--satsrc-ui);
	font-size: 0.8em;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.satsrc .satsrc-code-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 0.5em 0.8em;
	margin-left: auto;
}

/*
 * THE CODE: wpshl's numbered <pre>, but its lines are NEVER wrapped, and they can
 * be very long. The <pre> is what scrolls, both ways; it has no background, so
 * the window's picture stays put behind the text as it moves.
 */
html body .satsrc pre.satsrc-pre {
	display: flex;
	position: relative;
	align-items: flex-start;
	max-height: 80vh;
	font-size: var(--satsrc-code-size);
	text-align: left;
	direction: ltr;
	-moz-tab-size: var(--satsrc-tab);
	tab-size: var(--satsrc-tab);
	-webkit-hyphens: none;
	hyphens: none;
	overflow: auto !important;
	scrollbar-width: thin;
	scrollbar-color: var(--satsrc-rule) transparent;
	-webkit-overflow-scrolling: touch;
}

html body .satsrc pre.satsrc-pre > code {
	display: block !important;
	flex: 1 0 auto;
	position: relative;
	/* the space around the code, then the numbers, then the rule, then the code */
	padding: var(--satsrc-pad) var(--satsrc-pad) var(--satsrc-pad) calc(var(--satsrc-pad) + var(--satsrc-num) + 1.55em) !important;
	white-space: pre !important;
	word-break: normal !important;
	overflow-wrap: normal !important;
	word-wrap: normal !important;
	counter-reset: satsrc-line;
	/* the rule between numbers and code (when viewer.js has not drawn the numbers' column) */
	background-image: linear-gradient(var(--satsrc-rule), var(--satsrc-rule)) !important;
	background-repeat: no-repeat !important;
	background-position: calc(var(--satsrc-pad) + var(--satsrc-num) + 0.65em) 0 !important;
	background-size: 1px 100% !important;
}

/*
 * LINE NUMBERS are never part of what is copied, and never take up room on their
 * line (a number that did would shift every tab stop on it).
 *
 * These, drawn by CSS beside each line exactly as wpshl draws them, are what is
 * shown if viewer.js has not added the numbers' own column (below). They scroll
 * away when the code is scrolled sideways.
 */
.satsrc .satsrc-pre .satsrc-line::before {
	counter-increment: satsrc-line;
	content: counter(satsrc-line);
	position: absolute;
	left: 0;
	box-sizing: content-box;
	width: calc(var(--satsrc-pad) + var(--satsrc-num));
	color: var(--satsrc-text);
	font-weight: 400;
	font-style: normal;
	text-align: right;
	opacity: 0.6;
	-webkit-user-select: none;
	user-select: none;
	pointer-events: none;
}

/*
 * THE NUMBERS' COLUMN (viewer.js adds it: <span class="satsrc-nums"> before the
 * <code>, with every number in it). It looks exactly like the numbers above, with
 * the rule down its right edge -- but it is ONE element, stuck to the left
 * (sticky), so the numbers stay in view however far a long line is scrolled
 * sideways, at no cost however long the file is. The lines are exactly one
 * line-height apart (they never wrap), so the column lines up with them.
 *
 * The column never has a floor: once the code is scrolled sideways, viewer.js
 * clips away the part of it that passes under the column (clip-path on the
 * <code>), so the window's picture shows through the column as it does in
 * wpshl, wherever the panel is over it.
 */
html body .satsrc pre.satsrc-pre > .satsrc-nums {
	display: block;
	position: sticky;
	left: 0;
	z-index: 1;
	flex: none;
	width: calc(var(--satsrc-pad) + var(--satsrc-num) + 0.65em + 1px);
	margin: 0;
	padding: var(--satsrc-pad) 0.65em var(--satsrc-pad) 0;
	border-right: 1px solid var(--satsrc-rule);
	color: var(--satsrc-text);
	font: inherit;
	text-align: right;
	white-space: pre;
	-webkit-user-select: none;
	user-select: none;
}

html body .satsrc pre.satsrc-pre > .satsrc-nums > span {
	opacity: 0.6;
}

html body .satsrc pre.satsrc-pre.satsrc-has-nums > code {
	padding-left: calc(0.9em - 1px) !important;
	background-image: none !important;
}

html body .satsrc pre.satsrc-pre.satsrc-has-nums .satsrc-line::before {
	content: none;
}

/* Thin scroll bars in the hairline colour, on everything in the window that scrolls. */
.satsrc .satsrc-window,
.satsrc .satsrc-repos,
.satsrc pre.satsrc-log,
.satsrc.satsrc-is-full {
	scrollbar-width: thin;
	scrollbar-color: var(--satsrc-rule) transparent;
}

.satsrc pre.satsrc-pre::-webkit-scrollbar,
.satsrc .satsrc-window::-webkit-scrollbar,
.satsrc .satsrc-repos::-webkit-scrollbar,
.satsrc .satsrc-log::-webkit-scrollbar,
.satsrc.satsrc-is-full::-webkit-scrollbar {
	width: 8px;
	height: 8px;
	background: transparent;
}

.satsrc pre.satsrc-pre::-webkit-scrollbar-thumb,
.satsrc .satsrc-window::-webkit-scrollbar-thumb,
.satsrc .satsrc-repos::-webkit-scrollbar-thumb,
.satsrc .satsrc-log::-webkit-scrollbar-thumb,
.satsrc.satsrc-is-full::-webkit-scrollbar-thumb {
	border-radius: 4px;
	background: var(--satsrc-rule);
}

.satsrc pre.satsrc-pre::-webkit-scrollbar-corner,
.satsrc .satsrc-window::-webkit-scrollbar-corner,
.satsrc .satsrc-repos::-webkit-scrollbar-corner {
	background: transparent;
}

/*
 * THE PARTS OF THE CODE, in wpshl's colours. On the live site every part throws
 * the one black shadow it inherits from the window (wpshl's "each part its own
 * shadow colour" is switched off there), so no part sets a shadow of its own.
 */
.satsrc .satsrc-tk-comment { color: var(--satsrc-comment); font-style: italic; }
.satsrc .satsrc-tk-keyword { color: var(--satsrc-keyword); font-weight: var(--satsrc-keyword-weight); }
.satsrc .satsrc-tk-type { color: var(--satsrc-type); }
.satsrc .satsrc-tk-function { color: var(--satsrc-function); }
.satsrc .satsrc-tk-word { color: var(--satsrc-word); }
.satsrc .satsrc-tk-meta { color: var(--satsrc-meta); }
.satsrc .satsrc-tk-string { color: var(--satsrc-string); }
.satsrc .satsrc-tk-number { color: var(--satsrc-number); }
.satsrc .satsrc-tk-constant { color: var(--satsrc-constant); }
.satsrc .satsrc-tk-variable { color: var(--satsrc-variable); }
.satsrc .satsrc-tk-operator { color: var(--satsrc-operator); }
.satsrc .satsrc-tk-punctuation { color: var(--satsrc-punctuation); }

/*
 * SELECTED TEXT. As in wpshl: the browser's own highlight is a blue, and over a
 * blue picture, behind white letters, it cannot be seen. So the window has one
 * of its own -- a slab of the text colour, the letters in --satsrc-on-text, no
 * shadow -- on every part, because a part's own colour would otherwise win.
 */
.satsrc::selection,
.satsrc *::selection {
	background-color: var(--satsrc-text);
	color: var(--satsrc-on-text);
	text-shadow: none;
}

/* When the folder cannot be read at all: what the public sees, and (administrators only) why. */
.satsrc .satsrc-error {
	padding: 0.4em var(--satsrc-pad) var(--satsrc-pad);
	font-size: 17px;
	font-weight: 700;
}

.satsrc .satsrc-diagnose {
	margin: 0 var(--satsrc-pad) var(--satsrc-pad);
	padding: 0.85em 1em;
	border: 1px dashed rgba(255, 255, 255, 0.45);
	border-radius: 6px;
	background: rgba(0, 10, 32, 0.45);
	font-size: 14px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

html body .satsrc .satsrc-diagnose code {
	padding: 0.05em 0.35em !important;
	border-radius: 3px !important;
	background: rgba(0, 0, 0, 0.35) !important;
	font-family: var(--satsrc-mono) !important;
	font-size: 0.95em !important;
	-webkit-user-select: all;
	user-select: all;
}

/*
 * WIDE AND FULL WIDTH. `alignfull` breaks out of the page's column to the whole
 * width of the browser window: --satsrc-vw is that width without the page's
 * scroll bar (100vw would include it, and stick out under it), kept up to date
 * by viewer.js, and --satsrc-nudge is viewer.js's correction for a column that
 * is not in the middle of the window. !important, because the theme has full-width
 * rules of its own for blocks.
 *
 * The window's edge (the blue line down its left and along its bottom) is a hard
 * shadow drawn OUTSIDE the box, --satsrc-edge to its left: at the window's very
 * left it would be cut off. So a full-width viewer starts that far in, is that
 * much narrower, and keeps wpshl's rounded corners.
 */
html body .satsrc.alignfull {
	width: calc(var(--satsrc-vw, 100vw) - var(--satsrc-edge)) !important;
	max-width: none !important;
	min-width: 0 !important;
	margin-left: calc(50% - var(--satsrc-vw, 100vw) / 2 + var(--satsrc-edge) + var(--satsrc-nudge, 0px)) !important;
	margin-right: 0 !important;
	left: auto !important;
	transform: none !important;
}

/* `alignwide`: up to 120px wider on each side than the column, never past the window's edges */
html body .satsrc.alignwide {
	width: auto !important;
	max-width: none !important;
	margin-left: calc(clamp(0px, (var(--satsrc-vw, 100vw) - 100%) / 2 - 16px, 120px) * -1) !important;
	margin-right: calc(clamp(0px, (var(--satsrc-vw, 100vw) - 100%) / 2 - 16px, 120px) * -1) !important;
	left: auto !important;
	transform: none !important;
}

/*
 * On the theme's pages WITH sidebars (Hueman's two- and three-column layouts),
 * wider than the column would run over the sidebars: there, full and wide fill
 * the page's column, as the theme's own full-width blocks do. (The SOURCE page
 * is meant to be one column, col-1c, where full width really is the whole window.)
 */
html body:is(.col-2cl, .col-2cr, .col-3cm, .col-3cl, .col-3cr) .satsrc.alignfull,
html body:is(.col-2cl, .col-2cr, .col-3cm, .col-3cl, .col-3cr) .satsrc.alignwide {
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	border-radius: 6px;
}

/*
 * FULL WINDOW. The viewer covers the whole browser window, over the theme's
 * sticky header and the admin bar (z-index 99999); the page under it does not
 * scroll (html.satsrc-noscroll), the viewer does. Its title bar stays at the top,
 * so EXIT FULL WINDOW can always be reached; open files may be as tall as the
 * window allows.
 */
html.satsrc-noscroll,
html.satsrc-noscroll body {
	overflow: hidden !important;
}

html body .satsrc.satsrc-is-full {
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	z-index: 100000 !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	height: auto !important;
	max-height: none !important;
	margin: 0 !important;
	transform: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: auto !important;
	overscroll-behavior: contain;
}

.satsrc.satsrc-is-full .satsrc-bar {
	position: sticky;
	top: 0;
	z-index: 3;
	padding-bottom: 0.7em;
	background-color: var(--satsrc-bg);
	background-image: var(--satsrc-scrim);
	box-shadow: 0 1px 0 var(--satsrc-rule);
	margin-bottom: 0.75em;
}

html body .satsrc.satsrc-is-full pre.satsrc-pre {
	max-height: calc(100vh - 160px);
}

/*
 * TABLETS, and phones held sideways (720 to 939px): the full listing needs about
 * 895px and the chooser about 859px, so OPEN, VIEW and DOWNLOAD at the end of each
 * row would be out of sight, and a touch screen shows no scroll bar to say so.
 * As on a phone, MODIFIED goes from the listing and LAST TESTED from the chooser
 * (it is on the repository's own screen); everything else stays. Below 720px the
 * PHONES block, which comes after this one, takes over.
 */
@media only screen and (max-width: 939px) {
	.satsrc {
		--satsrc-name-min: 14em;
		--satsrc-cols: 6em 8em minmax(12.5em, max-content);
		--satsrc-row-min: calc(var(--satsrc-name-min) + 26.5em + 3 * var(--satsrc-gap) + 2 * var(--satsrc-pad));
		--satsrc-repo-cols: 9.6em 9em minmax(5em, 1fr);
		--satsrc-repo-min: calc(var(--satsrc-repo-name-min) + 23.6em + 3 * var(--satsrc-gap) + 2 * var(--satsrc-pad));
	}

	.satsrc .satsrc-head-row > .satsrc-date,
	.satsrc .satsrc-row > .satsrc-date,
	.satsrc .satsrc-repos > .satsrc-head-row > .satsrc-repo-tested,
	.satsrc .satsrc-repo-row > .satsrc-repo-tested {
		display: none;
	}
}

/*
 * PHONES (the theme's own breakpoint). The date column goes, and so does the
 * type, which on a phone only repeats what the name already shows (its ending,
 * a folder's slash, a file that cannot be opened being greyed out), and so does
 * VIEW (tapping a file's name opens it); the code is 13px. So a row fits the
 * width of a phone, with buttons big enough for a thumb. Lines of code are still
 * never wrapped, and a listing too wide for the screen still scrolls sideways.
 */
@media only screen and (max-width: 719px) {
	.satsrc {
		--satsrc-pad: 12px;
		--satsrc-title-size: 18px;
		--satsrc-code-size: 13px;
		--satsrc-gap: 0.6em;
		--satsrc-step: 1em;
		--satsrc-icon: 1.3em;
		--satsrc-name-min: 7.5em;
		--satsrc-cols: 4.8em minmax(7.3em, max-content);
		--satsrc-row-min: calc(var(--satsrc-name-min) + 12.1em + 2 * var(--satsrc-gap) + 2 * var(--satsrc-pad));
	}

	html body .satsrc {
		font-size: 15px;
	}

	.satsrc .satsrc-head-row > .satsrc-date,
	.satsrc .satsrc-row > .satsrc-date,
	.satsrc .satsrc-head-row > .satsrc-type,
	.satsrc .satsrc-row > .satsrc-type {
		display: none;
	}

	/*
	 * The row buttons (DOWNLOAD, OPEN): 11px words, about 28px tall, for a thumb.
	 * The actions column (7.3em of the 13px rows, about 95px) holds DOWNLOAD alone
	 * in any of the usual fonts, so every row keeps its columns under the headings.
	 */
	html body .satsrc .satsrc-row .satsrc-btn {
		padding: 0.5em 0.7em !important;
		font-size: 11px !important;
		letter-spacing: 0.03em !important;
	}

	/* VIEW only repeats what tapping the file's name does: on a phone it goes, and DOWNLOAD has the cell to itself */
	html body .satsrc .satsrc-row .satsrc-btn.satsrc-view {
		display: none !important;
	}

	.satsrc .satsrc-row > .satsrc-actions {
		gap: 8px;
	}

	/* the headings: never under 10px; NAME still starts over the names (past the arrows) */
	.satsrc .satsrc-head-row > span {
		font-size: 0.78em;
	}

	.satsrc .satsrc-head-row > .satsrc-name {
		padding-left: calc(var(--satsrc-icon) / 0.78);
	}

	/* without the TYPE column, a folder that cannot be read says so, under its name */
	html body .satsrc .satsrc-noaccess > .satsrc-row > .satsrc-name {
		flex-wrap: wrap;
	}

	.satsrc .satsrc-noaccess > .satsrc-row > .satsrc-name::after {
		content: "no access";
		flex: 0 0 100%;
		padding-left: calc(var(--satsrc-icon) / 0.85);
		font-size: 0.85em;
		font-style: italic;
		line-height: 1.2;
	}

	/* a file too big to show says so under its name too, as "no access" does, so its row's DOWNLOAD keeps the others' columns */
	.satsrc .satsrc-big > .satsrc-row .satsrc-note {
		display: none;
	}

	html body .satsrc .satsrc-big > .satsrc-row > .satsrc-name {
		flex-wrap: wrap;
	}

	.satsrc .satsrc-big > .satsrc-row > .satsrc-name::after {
		content: "too big to show";
		flex: 0 0 100%;
		padding-left: calc(var(--satsrc-icon) / 0.85);
		font-size: 0.85em;
		font-style: italic;
		line-height: 1.2;
	}

	.satsrc .satsrc-zip {
		font-size: 14px;
		gap: 0.3em 0.8em;
	}

	.satsrc .satsrc-zip-name {
		font-size: 15px;
	}

	.satsrc .satsrc-tested {
		font-size: 14px;
	}

	.satsrc .satsrc-code-path {
		font-size: 14px;
	}

	html body .satsrc .satsrc-tested-form input[type="text"] {
		width: 100%;
	}

	html body .satsrc .satsrc-tested-form label:has(input[type="text"]) {
		flex: 1 1 100%;
	}

	html body .satsrc.satsrc-is-full pre.satsrc-pre {
		max-height: calc(100vh - 200px);
	}

	/*
	 * The chooser on a phone: LAST TESTED goes (it is on the repository's own
	 * screen), and CREATED stays -- it is what the chooser is for. Down to 360px
	 * the four columns fit; narrower, the chooser scrolls sideways, as the
	 * listing does.
	 */
	.satsrc {
		--satsrc-repo-name-min: 7.4em; /* "satellite/" and its arrow, on one line */
		--satsrc-repo-name-max: 1fr;
		/* OPEN at 11px is about 45px, 3.8em of the chooser's 12px; the columns sit 0.4em apart */
		--satsrc-repo-cols: 9.2em 6em minmax(3.8em, max-content);
		--satsrc-repo-min: calc(var(--satsrc-repo-name-min) + 19em + 3 * 0.4em + 2 * var(--satsrc-pad));
	}

	/* OPEN a little narrower than the listing's buttons, and the columns a little closer, so that a
	   row still fits a 360px phone (the full-width viewer is --satsrc-edge narrower than the screen) */
	html body .satsrc .satsrc-repo-row .satsrc-btn {
		padding: 0.5em 0.5em !important;
	}

	.satsrc .satsrc-repos > .satsrc-head-row,
	.satsrc .satsrc-repo > .satsrc-row {
		column-gap: 0.4em;
	}

	/* the chooser's headings: never under 10px (0.84 of its 12px) */
	.satsrc .satsrc-repos > .satsrc-head-row > span {
		font-size: 0.84em;
	}

	.satsrc .satsrc-repos > .satsrc-head-row > .satsrc-name {
		padding-left: calc(var(--satsrc-icon) / 0.84);
	}

	/* on a phone OPEN keeps to the right edge, where a thumb finds it */
	.satsrc .satsrc-repo > .satsrc-row > .satsrc-actions {
		justify-content: flex-end;
	}

	.satsrc .satsrc-repos > .satsrc-head-row > .satsrc-repo-tested,
	.satsrc .satsrc-repo-row > .satsrc-repo-tested {
		display: none;
	}

	/* a pixel smaller than the listing, so that the four columns fit the narrowest
	   phones in use (360px wide; a phone's scroll bar takes no room) */
	.satsrc .satsrc-repos {
		font-size: 12px;
	}

	.satsrc .satsrc-repos-title {
		font-size: 15px;
	}

	.satsrc .satsrc-repo-name {
		font-size: 15px;
	}

	/* the date goes onto a line of its own, under the way back and the name */
	.satsrc .satsrc-repo-bar > .satsrc-created {
		flex: 1 0 100%;
	}

	.satsrc .satsrc-repo-bar > .satsrc-created::before {
		content: none;
	}
}

/* No pulsing for readers who have asked their system for less motion. */
@media (prefers-reduced-motion: reduce) {
	.satsrc .satsrc-item.satsrc-loading > .satsrc-row .satsrc-icon,
	.satsrc .satsrc-repo.satsrc-loading > .satsrc-row .satsrc-icon {
		animation: none;
		opacity: 0.5;
	}

	.satsrc .satsrc-row,
	html body .satsrc .satsrc-btn {
		transition: none;
	}
}

/* On paper: every open file in full, no scrolling, no picture, no glow, no buttons. */
@media print {
	.satsrc {
		--satsrc-text: #000000;
		--satsrc-comment: #555555;
		--satsrc-keyword: #000000;
		--satsrc-type: #1a3a5c;
		--satsrc-function: #3d2a00;
		--satsrc-word: #3d2a00;
		--satsrc-meta: #003f3a;
		--satsrc-string: #0f4d0f;
		--satsrc-number: #6b1f06;
		--satsrc-constant: #6e0a3a;
		--satsrc-variable: #25287a;
		--satsrc-operator: #222222;
		--satsrc-punctuation: #222222;
		--satsrc-rule: rgba(0, 0, 0, 0.35);
		--satsrc-tint: rgba(0, 0, 0, 0.06);
		--satsrc-guide: rgba(0, 0, 0, 0.15);
	}

	html body .satsrc {
		border: 1px solid #999999;
		background: #ffffff none !important;
		box-shadow: none;
		text-shadow: none;
	}

	html body .satsrc .satsrc-btn,
	html body .satsrc .satsrc-admin {
		display: none !important;
	}

	html body .satsrc pre.satsrc-pre {
		max-height: none;
		overflow: visible !important;
	}

	html body .satsrc pre.satsrc-pre > .satsrc-nums {
		position: static;
		background: none !important;
	}

	/* on paper nothing scrolls, so a clip left over from scrolling (viewer.js) would blank the start of every line */
	html body .satsrc pre.satsrc-pre > code {
		clip-path: none !important;
	}

	.satsrc .satsrc-window,
	.satsrc .satsrc-repos {
		overflow: visible;
	}
}
