/* the look of the file explorer (files.misob.dev), which has the look of Beszel: dark first */
:root {
	color-scheme: dark;
	--background: #161718; --foreground: #f7f7f8; --card: #191a1c; --muted: #26282b; --muted-foreground: #a7aaae;
	--primary: #f5f5f5; --accent: #26272a; --border: #2a2b2d; --input: #36373a; --ring: #cacbce; --table-header: #1f2023;
	--up: #3fb950; --part: #d29922; --down: #f47067; --none: #2c2e31; --radius: .8rem;
}
@media (prefers-color-scheme: light) {
	:root {
		color-scheme: light;
		--background: #fafaf9; --foreground: #1a1a1a; --card: #fff; --muted: #f1f0ef; --muted-foreground: #5c5957;
		--primary: #18181b; --accent: #f3efec; --border: #dddad7; --input: #bcb9b6; --ring: #837e79; --table-header: #f7f7f8;
		--up: #1f883d; --part: #b07d0a; --down: #c42f2f; --none: #e4e2df;
	}
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
	background: var(--background); color: var(--foreground);
	font: 14px/1.5 Inter, InterVariable, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 16px; }
main { display: grid; gap: 16px; }

.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 16px; }
.brand svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tag { padding: 2px 10px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); font-weight: 500; font-size: 12px; }
.updated { margin-left: auto; font-size: 13px; font-variant-numeric: tabular-nums; }

.card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pad { padding: 18px 20px; }
.muted { color: var(--muted-foreground); }
.big { font-size: 20px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
h2 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted-foreground); }
.dot.up { background: var(--up); }
.dot.down { background: var(--down); }
.dot.unknown { background: var(--none); box-shadow: inset 0 0 0 1px var(--muted-foreground); }

.banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.banner .dot { width: 14px; height: 14px; }
.banner.up .dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--up) 22%, transparent); }
.banner.down { border-color: color-mix(in srgb, var(--down) 45%, var(--border)); }
.banner.down .dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--down) 22%, transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--down) 8%, transparent); } }

.ghead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ghead h2 { margin: 0; color: var(--foreground); font-size: 14px; font-weight: 600; }
.ghead .muted { font-size: 13px; }

.chk { display: block; padding: 14px 16px; text-decoration: none; border-top: 1px solid var(--border); }
.ghead + .chk { border-top: 0; }
.chk:hover { background: var(--accent); }
.chk:focus-visible { outline-offset: -2px; border-radius: 0; }
.line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.name { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms { margin-left: auto; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pct { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4.2em; text-align: right; }

.bars { display: flex; gap: 2px; height: 28px; }
.bars i { flex: 1; min-width: 0; border-radius: 2px; background: var(--none); }
.bars i.up { background: var(--up); }
.bars i.part { background: var(--part); }
.bars i.down { background: var(--down); }
.bars i:hover { opacity: .7; }
.axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; }
.axis .short { display: none; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 12px 14px; font-weight: 500; }
.crumbs a, .crumbs span { padding: 2px 6px; border-radius: 6px; }
.crumbs a { text-decoration: none; color: var(--muted-foreground); }
.crumbs a:hover { background: var(--accent); color: var(--foreground); }
.crumbs span { color: var(--muted-foreground); }
.crumbs .here { color: var(--foreground); }
.crumbs .sep { opacity: .6; padding: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stats .big { font-variant-numeric: tabular-nums; }

.chart { position: relative; height: 140px; margin-top: 4px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart path { fill: none; stroke: var(--up); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.chart .top { position: absolute; right: 0; top: -2px; transform: translateY(-100%); font-size: 12px; font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted-foreground); background: var(--table-header); padding: 8px 16px; }
td { padding: 9px 16px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
td .dot { width: 8px; height: 8px; margin-right: 4px; vertical-align: 1px; }
.empty { margin: 0; padding: 16px; }
.foot { margin: 24px 0 8px; text-align: center; font-size: 13px; }

/* a phone: the last 30 days instead of 90 */
@media (max-width: 640px) {
	.wrap { padding: 12px; }
	main { gap: 12px; }
	.bars i:nth-last-child(n+31) { display: none; }
	.axis .long { display: none; }
	.axis .short { display: inline; }
	.bars { height: 24px; }
	.big { font-size: 18px; }
	.stats { gap: 12px; grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .banner.down .dot { animation: none; } }

/* the dashboard */
.dgroup { margin: 4px 2px 10px; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; transition: background .15s, border-color .15s; }
.tile:hover { background: var(--accent); border-color: var(--input); }
.tile:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: calc(var(--radius) - 2px); background: var(--muted); border: 1px solid var(--border); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tbody { display: grid; min-width: 0; flex: 1; }
.tname { font-weight: 600; font-size: 15px; }
.tdesc, .thost { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thost { opacity: .75; }
.tile .dot { align-self: flex-start; margin-top: 2px; }
.banner.slim { padding: 12px 16px; gap: 12px; text-decoration: none; font-weight: 500; }
.banner.slim .dot { width: 10px; height: 10px; }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; gap: 10px; } .tile { padding: 14px; } }
