/* One stylesheet for the public home page, the sign-in page and the private hub page. */

:root {
	--bg: #f6f8fb;
	--surface: #ffffff;
	--text: #1c2330;
	--muted: #5b6676;
	--line: #d8dee8;
	--accent: #1f6feb;
	--accent-text: #ffffff;
	--danger: #c62828;
	--good-bg: #e7f6ec;
	--mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0e1420;
		--surface: #161d2b;
		--text: #e6ebf3;
		--muted: #9aa6b8;
		--line: #2a3446;
		--accent: #5b9dff;
		--accent-text: #0b1220;
		--danger: #ff7b72;
		--good-bg: #12301f;
	}
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
.wrap { max-width: 44rem; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Public home page */
.home h1 { font-size: 2.4rem; margin: 2rem 0 0.25rem; letter-spacing: -0.02em; }
.home .headline { margin: 0; color: var(--muted); font-size: 1.15rem; }
.home .about { margin: 1.75rem 0 1rem; font-size: 1.05rem; }
.home h2 { margin: 2.75rem 0 1rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.cards { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card p { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem !important; }
.tags span { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.6rem; }
.home footer { margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* Sign-in page */
.sign-in { text-align: center; padding-top: 18vh; }
.sign-in h1 { margin: 1rem 0 0.25rem; }

/* Buttons and fields */
button, .button {
	font: inherit; display: inline-block; padding: 0.45rem 0.95rem; border-radius: 8px; border: 1px solid var(--line);
	background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
}
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.danger { color: var(--danger); }
button:disabled { opacity: 0.5; cursor: default; }
input, select, textarea {
	font: inherit; width: 100%; padding: 0.45rem 0.6rem; border-radius: 8px; border: 1px solid var(--line);
	background: var(--surface); color: var(--text);
}
input[type="checkbox"] { width: auto; }
textarea { font-family: var(--mono); font-size: 0.9rem; min-height: 9rem; resize: vertical; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
label > input, label > select, label > textarea { margin-top: 0.25rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Private hub page */
.app { max-width: 68rem; }
.bar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.bar h1 { font-size: 1.25rem; margin: 0; flex: 1; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
@media (max-width: 760px) { .columns { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.columns .panel { margin-bottom: 0; }
.panel h2 { font-size: 1rem; margin: 0 0 0.9rem; }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 8rem; }
.row > button, .row > .fixed { flex: 0 0 auto; }
.list { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list button { width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 0.6rem 0.25rem; }
.list button:hover, .list button[aria-current="true"] { background: var(--bg); }
.list strong { display: block; overflow-wrap: anywhere; }
.list small { color: var(--muted); }
.gap-top { margin-top: 1rem; }
label.flat { margin: 0; }
.note { font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0; }
.message { margin: 0.75rem 0 0; font-size: 0.9rem; }
.message.bad { color: var(--danger); }
.secret { background: var(--good-bg); border-radius: 8px; padding: 0.75rem; font-size: 0.9rem; overflow-wrap: anywhere; }
.secret code { font-family: var(--mono); user-select: all; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem 0.4rem 0; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; border-top: 0; }
