/* Shared by every page: colors, type, the header bar, buttons, and the footer.
   The site is dark unless theme.js sets data-theme="light" on <html>, which it
   does only when the visitor chose light with the switch. Every color on the
   site comes from here. */
/* The fonts, for a page whose own <head> does not link them. */
@import url("https://fonts.googleapis.com/css2?family=Funnel+Display:wght@500..800&family=Geist:wght@400..700&family=Geist+Mono:wght@400..500&display=swap");
:root {
	/* The colors the charts read (review.js) stay plain hex. */
	--bg: #0f0e17;
	--panel: #191824;
	--panel-2: #232231;
	--line: #2e2d3f;
	--line-2: #47455e; /* a border under the pointer */
	--text: #f1f0f7;
	--muted: #a9a7ba;
	--faint: #8b899d;
	--accent: #96a3ff;
	--on-accent: #0f0e17;
	--good: #4fd3a5;
	--warn: #f0b44c;
	--bad: #ff8aa3;
	--note: #96a3ff;
	--important: #c2a6ff;
	/* What a chosen option in a row of choices is raised to. */
	--raised: #36344b;
	/* The headline tile and the closing band: one dark field with light type. */
	--field: #262a6b;
	--field-text: #ffffff;
	--field-muted: #c3c7f3;
	--field-line: #40469a;
	/* Terminal output stays dark in both themes, as a terminal does. */
	--term-bg: #08070e;
	--term-text: #dddbea;
	--term-dim: #7d7a92;
	--term-head: #ffcf5c;
	--term-good: #6fe0b4;
	/* Tints and the chart ramp follow the colors above. */
	--accent-soft: color-mix(in srgb, var(--accent) 14%, var(--panel));
	--accent-line: color-mix(in srgb, var(--accent) 40%, var(--panel));
	--good-soft: color-mix(in srgb, var(--good) 14%, var(--panel));
	--good-line: color-mix(in srgb, var(--good) 40%, var(--panel));
	--bad-soft: color-mix(in srgb, var(--bad) 12%, var(--panel));
	--bad-line: color-mix(in srgb, var(--bad) 40%, var(--panel));
	--heat-0: var(--panel-2);
	--heat-1: color-mix(in srgb, var(--accent) 28%, var(--panel-2));
	--heat-2: color-mix(in srgb, var(--accent) 52%, var(--panel-2));
	--heat-3: color-mix(in srgb, var(--accent) 76%, var(--panel-2));
	--heat-4: var(--accent);
	/* One scale of corners: a tag, a control, a card, a band. */
	--r-sm: 6px;
	--r-md: 10px;
	--radius: 14px;
	--r-lg: 22px;
	/* Rows in a table or a list are parted by dots, cards by a hairline. */
	--sep: 2px dotted var(--line);
	--card-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
	/* Under what floats above the page: menus and popups. */
	--shadow: 0 0 0 1px rgb(0 0 0 / 0.3), 0 24px 48px -16px rgb(0 0 0 / 0.65);
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--dur: 180ms;
	--sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
	--display: "Funnel Display", "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
	--mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color-scheme: dark;
}
html[data-theme="light"] {
	--bg: #f6f6f9;
	--panel: #ffffff;
	--panel-2: #eeeef3;
	--line: #e3e3ea;
	--line-2: #c8c8d4;
	--text: #15131f;
	--muted: #5a5868;
	--faint: #6c6a7b;
	--accent: #2f45d8;
	--on-accent: #ffffff;
	--good: #0f7553;
	--warn: #8a5a00;
	--bad: #c0264a;
	--note: #2f45d8;
	--important: #7a3fd6;
	--raised: #ffffff;
	--field: #17152b;
	--field-text: #ffffff;
	--field-muted: #b5b2cb;
	--field-line: #353252;
	--term-bg: #17152b;
	--card-shadow: 0 1px 2px rgb(21 19 31 / 0.05);
	--shadow: 0 0 0 1px rgb(21 19 31 / 0.06), 0 24px 48px -20px rgb(21 19 31 / 0.3);
	color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code { background: var(--panel-2); border-radius: var(--r-sm); padding: 2px 6px; }
h1, h2, h3 { line-height: 1.15; }
.wrap { max-width: 1152px; margin: 0 auto; padding: 0 32px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* The server marks <html> with data-hosted when someone is signed in (and
   data-staff for reviewers), so these show or hide what only an account needs. */
html:not([data-hosted]) .hosted-only, html[data-hosted] .local-only, html:not([data-staff]) .staff-only { display: none !important; }
/* The Worker also marks every page it serves with data-web, which `helios
   dashboard` does not. So app-only shows to someone signed in and on this
   computer's own dashboard, and guest-only to a visitor of the website who
   is not signed in. */
html[data-web]:not([data-hosted]) .app-only, html:not([data-web]) .guest-only, html[data-hosted] .guest-only { display: none !important; }

/* Header bar */
/* The side padding keeps the bar's contents in line with .wrap on a wide screen. */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 max(32px, calc(50% - 544px));
	background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); white-space: nowrap; }
.nav .brand { display: flex; align-items: center; gap: 9px; margin-right: auto; font: 800 24px/1 var(--display); letter-spacing: -0.035em; color: var(--text); }
.nav .brand:hover { text-decoration: none; }
.nav .brand img { width: 24px; height: 24px; }
.nav .links { display: flex; align-items: stretch; align-self: stretch; gap: 2px; margin-right: 6px; }
/* A page's link is as tall as the bar, and the page that is open is underlined at the bar's foot. */
.nav .links a { position: relative; display: flex; align-items: center; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--muted); transition: color var(--dur) var(--ease); }
.nav .links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease); }
.nav .links a:hover { color: var(--text); text-decoration: none; }
.nav .links a.active { color: var(--text); }
.nav .links a.active::after { transform: scaleX(1); }

/* The dark and light switch: a sun while dark, a moon while light. */
.theme { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--r-md); background: var(--panel-2); color: var(--muted); cursor: pointer; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.theme:hover { color: var(--text); background: color-mix(in srgb, var(--panel-2) 88%, var(--text)); }
.theme svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme .moon, html[data-theme="light"] .theme .sun { display: none; }
.theme.lang { width: auto; padding: 0 12px; font: 600 13px/1 var(--sans); }
html[data-i18n-pending] body { visibility: hidden; }
html[data-theme="light"] .theme .moon { display: block; }

/* Buttons */
/* One primary button a view, for what the visitor most likely came to do. */
.btn { --btn: var(--panel); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--btn); color: var(--text); font: 600 15px var(--sans); letter-spacing: -0.005em; cursor: pointer; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
/* A button rises under the pointer and sinks when pressed. */
.btn:hover { border-color: color-mix(in srgb, var(--line-2) 60%, var(--text)); background: color-mix(in srgb, var(--btn) 94%, var(--text)); text-decoration: none; transform: translateY(-1px); }
.btn:active { background: color-mix(in srgb, var(--btn) 88%, var(--text)); transform: translateY(1px); }
.btn.primary { --btn: var(--accent); border-color: var(--btn); color: var(--on-accent); }
.btn.primary:hover, .btn.danger.fill:hover { border-color: transparent; background: color-mix(in srgb, var(--btn) 88%, var(--text)); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad-line); background: var(--bad-soft); }
/* The button that carries out something that can't be undone, in a popup that asks first. */
.btn.danger.fill { --btn: var(--bad); border-color: var(--btn); color: var(--on-accent); }
.btn.danger.fill:hover { background: color-mix(in srgb, var(--btn) 92%, var(--text)); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
/* While its request is on the way, so a second click can't send it twice. */
.btn[aria-busy="true"] { cursor: progress; }
@media (prefers-reduced-motion: reduce) {
	.btn, .theme, .nav .links a, .nav .links a::after { transition: none; }
	.btn:hover, .btn:active { transform: none; }
}

/* The account menu: the visitor's initial and name, opening Account and Sign out. */
.nav .account { position: relative; margin-left: 6px; }
.account summary { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: var(--r-md); cursor: pointer; list-style: none; font: 500 14px/1 var(--sans); color: var(--text); user-select: none; }
.account summary::-webkit-details-marker { display: none; }
.account summary:hover, .account[open] summary { background: var(--panel-2); }
.account .avatar { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--field); color: var(--field-text); font: 700 13px/1 var(--display); text-transform: uppercase; }
.account .who { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .chev { flex: none; color: var(--faint); }
.account[open] .chev { transform: rotate(180deg); }
.account .menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px; padding: 6px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.account .menu form { margin: 0; }
.account .menu .who-line { padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: var(--sep); font-size: 12px; line-height: 1.4; color: var(--muted); }
.account .menu .who-line b { display: block; font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .menu a, .account .menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font: 500 14px var(--sans); color: var(--text); cursor: pointer; }
.account .menu a:hover, .account .menu button:hover { background: var(--panel-2); text-decoration: none; }

/* The app's own pages (body.app) put the account menu in a sidebar for someone
   signed in, once the window is wide enough. Narrower, the menu stays in the bar. */
.appnav { display: none; }
@media (min-width: 861px) {
	html[data-hosted] body.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
	html[data-hosted] body.app > .nav { grid-column: 1 / -1; padding: 0 24px; }
	html[data-hosted] body.app > main { grid-column: 2; min-width: 0; width: 100%; }
	html[data-hosted] body.app .nav :is(.account, .app-only, .settings-link, .staff-only) { display: none; }
	html[data-hosted] body.app .appnav { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; padding: 24px 16px; border-right: 1px solid var(--line); }
}
.appnav .who-line { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; margin-bottom: 10px; border-bottom: var(--sep); font-size: 12px; line-height: 1.4; color: var(--muted); }
.appnav .who-line > span:last-child { min-width: 0; }
.appnav .who-line b { display: block; font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appnav .avatar { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--field); color: var(--field-text); font: 700 15px/1 var(--display); text-transform: uppercase; }
.appnav-links { display: grid; gap: 2px; }
.appnav a, .appnav button { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: none; text-align: left; font: 500 15px var(--sans); color: var(--muted); cursor: pointer; }
.appnav a:hover, .appnav button:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.appnav a[aria-current="page"] { color: var(--text); background: var(--panel-2); font-weight: 600; }
.appnav form { margin: auto 0 0; padding-top: 12px; border-top: var(--sep); }

/* A command to copy, alone or under tabs for each OS */
.tab-panel[hidden] { display: none; }
.cmd { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; }
/* A command longer than its box scrolls sideways, and fades out where it is cut, so it doesn't read as the whole command. */
.cmd code { flex: 1; min-width: 0; white-space: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 13px; background: none; border: 0; padding: 0 20px 0 0; color: var(--text); mask-image: linear-gradient(to left, transparent, #000 20px); }
.cmd code::before { content: "$ "; color: var(--faint); }
.cmd.ps code::before { content: "PS> "; }
.cmd.plain code::before { content: none; }
/* Wide enough for "Copied", so the command beside it doesn't move when the word changes. */
.copy { flex: none; min-width: 68px; height: 30px; padding: 0 13px; border: 0; border-radius: 8px; background: var(--panel-2); font: 600 13px var(--sans); color: var(--text); white-space: nowrap; cursor: pointer; transition: background-color var(--dur) var(--ease); }
.copy:hover { background: color-mix(in srgb, var(--panel-2) 86%, var(--text)); }

/* On a banned person's own pages: that they are banned, and until when. */
.ban-banner { display: flex; align-items: center; gap: 18px; margin: 0 0 28px; padding: 18px 22px; border: 1px solid var(--bad-line); border-radius: var(--radius); background: var(--bad-soft); color: var(--text); }
.ban-banner svg { flex: none; fill: none; stroke: var(--bad); stroke-width: 1.6; stroke-linecap: round; }
.ban-banner h2 { margin: 0 0 4px; font: 700 19px/1.3 var(--display); letter-spacing: -0.015em; color: var(--bad); }
.ban-banner p { margin: 0; font-size: 15px; color: var(--text); }

/* A popup, such as the one that shows a new key to copy */
dialog.modal { width: min(580px, calc(100vw - 32px)); padding: 28px 28px 24px; border: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgb(10 9 18 / 0.6); backdrop-filter: blur(3px); }
dialog.modal h2 { margin: 0 0 8px; font: 700 24px/1.15 var(--display); letter-spacing: -0.025em; }
dialog.modal p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
dialog.modal .box { margin: 0 0 18px; border-radius: var(--r-md); background: var(--panel-2); }
/* All of it shows, wrapped, so it can be read and selected as well as copied. */
dialog.modal .cmd code { user-select: all; white-space: pre-wrap; overflow-wrap: anywhere; padding: 0; mask-image: none; }
dialog.modal .cmd .copy { background: var(--panel); }
dialog.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin: 20px 0 0; }
dialog.modal form { margin: 0; }
@media (max-width: 520px) {
	dialog.modal { padding: 22px 20px 20px; }
	dialog.modal h2 { font-size: 21px; }
}

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 12px 28px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--text); }

@media (max-width: 860px) {
	.nav .links a.opt, .account .who, .account .chev { display: none; }
	.account summary { padding-right: 4px; }
	.nav, .wrap { padding: 0 20px; }
}
/* On a phone the bar has room for the pages and the account menu only. */
@media (max-width: 520px) {
	.nav { gap: 4px; padding: 0 14px; }
	.nav .brand { font-size: 21px; }
	/* Should the pages still not fit, as in a longer language, they scroll rather than widen the page. */
	.nav .links { min-width: 0; margin-right: 2px; overflow-x: auto; scrollbar-width: none; }
	.nav .links a { flex: none; padding: 0 7px; font-size: 14px; }
	.nav .links a::after { left: 7px; right: 7px; bottom: 0; }
	.nav .account { margin-left: 2px; }
	/* Docs, and Settings, which the account menu has, make room for the app's own pages. */
	html:is([data-hosted], :not([data-web])) .nav .docs-link, html[data-hosted] .nav .settings-link { display: none; }
	html:is([data-hosted], :not([data-web])) .nav .brand { font-size: 0; } /* the logo stands alone; the name would not fit */
}
/* The logo is drawn in black; on the dark theme it shows in white. */
html:not([data-theme="light"]) img.logo { filter: invert(1); }
