/* The logged-in pages' type: the two faces the eye scene declares for its
   terminal window, at the same urls, so a page that loads both sheets resolves
   them to one file each (scenes/eye/eye.css). Tamzen 15 is 8x15, the config's
   `xft:Tamzen:pixelsize=15`: every glyph whole pixel squares, so at exactly 15px
   it sits on the pixel grid. */
@font-face {
	font-family: "Tamzen";
	src: url("/static/scenes/eye/tamzen-15.ttf") format("truetype");
	font-display: block;
}

@font-face {
	font-family: "Tamzen 16";
	/* 8x16, only for the fields on a touch screen: ios zooms under 16px */
	src: url("/static/scenes/eye/tamzen-16.ttf") format("truetype");
	font-display: block;
}

/* The typed hand: Igino Marini's OFL restoration of the 17th-century Oxford Fell
   types, whose outlines were traced off the printed pages themselves, so the
   contours carry real ink spread and wear instead of a distressed filter laid
   over clean curves. The licence travels with the file in src/assets/fonts.

   Declared `swap`, not the `block` the u001 cuts use: the only text on the login
   sheet is what the visitor is typing, and `block` would hold their own
   keystrokes invisible for up to 3s on a cold cache. */
@font-face {
	font-family: "Fell English";
	src: url("/static/fonts/fell-eng-reg.ttf") format("truetype");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #050403;
	--fg: #efe6dc;
	--dim: #ada399;
	--accent: #8c2c26;
	--accent-hi: #c03830;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

/* Paper, not a switched-off screen: two big soft radial washes for the mottle
   of a cheap page. Gradients, not noise, because they never repeat and so can
   never show a seam. The login sheet's grain lives on its #wall
   (login/login.css), so that it lands in the same frame as the marks instead
   of a beat before them. */
body {
	background-color: var(--bg);
	background-image:
		radial-gradient(
			ellipse 65% 50% at 22% 12%,
			rgba(255, 245, 230, 0.03),
			transparent 72%
		),
		radial-gradient(
			ellipse 60% 45% at 82% 82%,
			rgba(255, 240, 225, 0.022),
			transparent 70%
		);
	background-repeat: no-repeat, no-repeat;
	background-attachment: fixed;
	color: var(--fg);
	font-family: "Tamzen", ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 16px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a {
	color: inherit;
}

/* ---------------------------------------------------------------- account */

.auth-form {
	display: contents;
}

/* the account forms' single 300px column */
.input-zone,
.actions,
.error {
	width: 75%;
	max-width: 300px;
	align-self: center;
}

.input-zone {
	display: flex;
	flex-direction: column;
}

.input-zone .field {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.6rem;
	margin-top: 0.3rem;
	position: relative;
}

.input-zone .field:first-child {
	margin-top: 0;
}

.input-zone .field > .label {
	font-style: italic;
	font-size: 1rem;
	min-width: 4.75rem;
	transform: scale(1.05, 0.95);
	transform-origin: left center;
	letter-spacing: -0.01em;
}

/* every plain text control is a dotted underline */
.input-zone .field > input,
.grants input,
.grants select {
	background: transparent;
	color: var(--fg);
	border: 0;
	border-bottom: 1px dotted var(--dim);
	border-radius: 0;
	outline: none;
}

.input-zone .field > input:focus,
.grants input:focus,
.grants select:focus {
	border-bottom-color: var(--accent);
}

.input-zone .field > input {
	margin-top: 0.175rem;
	height: 1.7rem;
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 180ms ease;
}

.actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.4rem;
}

.submit {
	appearance: none;
	-webkit-appearance: none;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	line-height: 1;
	white-space: nowrap;
	font-family: inherit;
	font-style: italic;
	font-weight: bold;
	font-size: 1rem;
	letter-spacing: -0.01em;
	color: var(--accent);
	transform: scale(1.05, 0.95);
	transform-origin: right center;
	transition: color 180ms ease;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
}

.submit:hover {
	color: var(--accent-hi);
}

.error {
	font-size: 0.85rem;
	text-align: center;
	color: var(--accent);
}

/* ------------------------------------------------------------------ index */

.brand {
	display: inline-block;
	text-decoration: none;
	font-weight: bold;
	font-size: 1.6rem;
	letter-spacing: -0.04em;
	transform: scale(1.05, 0.95);
	transform-origin: left center;
}

.bar-right {
	display: inline-flex;
	align-items: baseline;
	gap: 1rem;
	font-size: 0.85rem;
	color: var(--dim);
}

.bar-right .logout {
	color: var(--dim);
	text-decoration: none;
	border-bottom: 1px dotted var(--dim);
}

.bar-right .logout:hover {
	color: var(--fg);
	border-bottom-color: var(--fg);
}

.tiles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.5rem;
}

.tile a {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.7rem 0.8rem;
	border: 1px dotted var(--dim);
	text-decoration: none;
	transition:
		border-color 150ms ease,
		background-color 150ms ease;
}

.tile a:hover {
	border-color: var(--accent);
	background: rgba(140, 44, 38, 0.06);
}

.tile-name {
	font-weight: bold;
	letter-spacing: -0.01em;
}

.tile-desc {
	font-size: 0.8rem;
	font-style: italic;
	color: var(--dim);
	min-height: 1em;
}

/* ------------------------------------------------------------------ admin */

.tiles.users {
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

.grants {
	list-style: none;
	margin: 0.4rem 0 0;
	padding: 0;
	font-size: 0.85rem;
}

.grants form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding: 0.2rem 0;
}

.grants span {
	min-width: 6rem;
	color: var(--dim);
}

.grants span.on {
	color: var(--fg);
	font-weight: bold;
}

.grants input,
.grants select {
	font: inherit;
}

.grants input {
	min-width: 15rem;
}
