/* WaypointCloud — Lux design system (see hostingpanel docs/DESIGN.md) */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url(fonts/instrument-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url(fonts/instrument-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url(fonts/instrument-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
	--bg: #F5F6F8;
	--surface: #FFFFFF;
	--side: #23272B;
	--side-hover: #2E3338;
	--border: #E6E8EB;
	--input: #858C95;
	--hover: #EEF0F3;
	--text: #24292E;
	--muted: #5C6570;
	--side-text: #E8EAED;
	--side-muted: #B8BEC5;
	--accent: #F5C518;
	--accent-hover: #FFD53D;
	--accent-strong: #8A6D00;
	--accent-soft: #FFF8E0;
	--on-accent: #23272B;
	--ok: #2E7D32;  --ok-bg: #E4F3E5;
	--err: #CC2222; --err-bg: #FDEAEA;
	--elev-card: 0 1px 2px rgba(35, 39, 43, 0.05), 0 1px 1px rgba(35, 39, 43, 0.03);
	--shadow-header: 0 2px 12px rgba(0, 0, 0, 0.30);
	color-scheme: light;
}

.dark {
	--bg: #1A1D21; --surface: #23272B; --side: #1A1D21; --side-hover: #2E3338;
	--border: #2E3338; --input: #737B84; --hover: #2E3338;
	--text: #E8EAED; --muted: #B8BEC5;
	--accent-strong: #FFD53D; --accent-soft: #3A3210;
	--ok: #6FCF75; --ok-bg: #1B3A1D; --err: #F08B80; --err-bg: #4A1C1C;
	--elev-card: none;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

/* Filtered rows use the hidden attribute; must win over display:grid on phones. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 14px/1.45 "Instrument Sans", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}

h1, h2 { font-weight: 600; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: 24px; line-height: 1.2; }
h2 { font-size: 17px; }
p { margin: 0; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid #F5C518; outline-offset: 2px; }

.skip-link {
	position: absolute; left: 12px; top: -48px; z-index: 20;
	background: var(--accent); color: var(--on-accent); font-weight: 600;
	padding: 8px 12px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Header: always charcoal */
.site-header {
	position: sticky; top: 0; z-index: 10;
	background: var(--side); color: var(--side-text);
	box-shadow: var(--shadow-header);
}
.site-header__inner {
	max-width: 1100px; margin: 0 auto; height: 56px; padding: 0 24px;
	display: flex; align-items: center; justify-content: space-between;
}
.wordmark { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.wordmark strong { color: var(--accent); font-weight: 700; }

.icon-button {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 8px; border: 0;
	background: transparent; color: var(--side-text); cursor: pointer;
	transition: background-color 120ms;
}
.icon-button:hover { background: var(--side-hover); }
.icon-button .icon { width: 18px; height: 18px; }
.icon--moon { display: none; }
.dark .icon--sun { display: none; }
.dark .icon--moon { display: block; }

.page { max-width: 1100px; margin: 0 auto; padding: 28px 24px 40px; display: flex; flex-direction: column; gap: 20px; }

.card {
	background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
	box-shadow: var(--elev-card);
}
.message { padding: 24px; display: flex; flex-direction: column; gap: 8px; max-width: 640px; }

/* World summary */
.world { display: flex; flex-direction: column; gap: 14px; }
.world__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.world h1 { overflow-wrap: anywhere; }
.world__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.world__meta div { display: flex; flex-direction: column; gap: 2px; }
.world__meta dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.world__meta dd { margin: 0; font-weight: 500; }

/* Badges */
.badge {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
	background: var(--accent-soft); color: var(--accent-strong);
	white-space: nowrap;
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--neutral { background: var(--hover); color: var(--muted); }
.badge--err { background: var(--err-bg); color: var(--err); }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search {
	position: relative; flex: 1 1 240px; max-width: 360px;
	display: flex; align-items: center;
}
.search .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input {
	width: 100%; height: 38px; padding: 0 12px 0 36px;
	border: 1px solid var(--input); border-radius: 8px;
	background: var(--surface); color: var(--text); font: inherit;
}
.search input::placeholder { color: var(--muted); }

.segmented {
	display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
	background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.segmented__item {
	height: 30px; padding: 0 12px; border: 0; border-radius: 7px;
	background: transparent; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer;
	transition: background-color 120ms, color 120ms;
}
.segmented__item:hover { background: var(--hover); color: var(--text); }
.segmented__item[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.segmented__item .count { font-size: 12px; opacity: .75; margin-left: 2px; }

/* Buttons */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	height: 32px; padding: 0 12px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer;
	transition: background-color 120ms, color 120ms, border-color 120ms;
}
.button--secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.button--secondary:hover { background: var(--hover); }
.button.is-copied { color: var(--ok); border-color: var(--ok-bg); background: var(--ok-bg); }

/* Waypoint table (desktop) */
.table-card { overflow: hidden; }
.waypoints { width: 100%; border-collapse: collapse; }
.waypoints th {
	text-align: left; font-size: 12px; font-weight: 500; color: var(--muted);
	padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.waypoints td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.waypoints tbody tr:last-child td { border-bottom: 0; }
.waypoints tbody tr:hover td { background: var(--hover); }
.waypoints .num { text-align: right; white-space: nowrap; }
.waypoints td.num { font-size: 14px; }
.wp-actions { width: 1%; text-align: right; }
.wp-dim { white-space: nowrap; }

.wp-name__inner { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wp-name__text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.wp-name__title { font-weight: 600; overflow-wrap: anywhere; }
.wp-portal { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.wp-portal .mono { color: var(--text); margin-left: 4px; }

.swatch {
	flex: none; width: 28px; height: 28px; border-radius: 8px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--c, #858C95); color: #fff;
	font-size: 12px; font-weight: 700; text-shadow: 0 1px 1px rgba(0, 0, 0, .55);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.empty { padding: 24px 16px; text-align: center; }
.footnote { font-size: 12px; }

/* Phone: rows become cards */
@media (max-width: 720px) {
	.site-header__inner { padding: 0 16px; }
	.page { padding: 20px 16px 32px; gap: 16px; }
	h1 { font-size: 22px; }
	.search { max-width: none; }
	.segmented { width: 100%; }
	.segmented__item { flex: 1 1 auto; }

	.table-card { background: transparent; border: 0; box-shadow: none; overflow: visible; }
	.waypoints, .waypoints tbody { display: block; }
	.waypoints thead { display: none; }
	.waypoints tbody { display: flex; flex-direction: column; gap: 10px; }
	.waypoints tbody tr {
		display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; padding: 14px;
		background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--elev-card);
	}
	.waypoints tbody tr:hover td { background: transparent; }
	.waypoints td { padding: 0; border: 0; }
	.wp-name { grid-column: 1 / -1; }
	.wp-dim { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
	.waypoints td.num { text-align: left; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
	.waypoints td.num::before { content: attr(data-label); font: 500 12px/1.2 "Instrument Sans", system-ui, sans-serif; color: var(--muted); }
	.wp-actions { grid-column: 1 / -1; width: auto; }
	.wp-actions .button { width: 100%; height: 40px; }
	.wp-dim { order: -1; }
	.wp-name { order: -2; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
