/* Open5500 app styles (search, employer view, lists, feedback, about, terms).
   Loaded after /assets/site.css, which holds the design tokens, header and footer. */
/* Layout idea: a filing-ledger workbench. Filters on the left like form lines, results as a dense ledger, employer pages read like an annotated Schedule A. */
/* colors, fonts and dark mode: see /assets/site.css (design tokens) */
* {
	box-sizing: border-box;
}
html,
body {
	margin: 0;
	height: 100%;
}
body {
	background: var(--paper);
	color: var(--ink);
	font: 14px/1.45 var(--body);
}
a {
	color: var(--accent);
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
h1,
h2,
h3 {
	font-family: var(--display);
	text-wrap: balance;
	margin: 0;
}
.num,
td.n,
.mono {
	font-variant-numeric: tabular-nums;
}
.mono {
	font-family: var(--mono);
	font-size: 12.5px;
}

.btn {
	border: 1px solid var(--rule);
	background: var(--panel);
	padding: 6px 12px;
	border-radius: var(--radius);
	cursor: pointer;
	font-weight: 500;
}
.btn:hover {
	border-color: var(--accent);
}
.btn.primary {
	background: var(--accent);
	color: var(--panel);
	border-color: var(--accent);
}
.btn.primary:hover {
	filter: brightness(1.08);
}
.btn.ghost {
	border-color: transparent;
	background: transparent;
	color: var(--accent);
}
.btn[disabled] {
	opacity: 0.5;
	cursor: default;
}

/* search layout */
.workbench {
	display: grid;
	grid-template-columns: 290px 1fr;
	gap: 0;
	min-height: calc(100% - 53px);
}
aside.filters {
	border-right: 1px solid var(--rule);
	background: var(--panel);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	overflow-y: auto;
	max-height: calc(100vh - var(--header-h) - 1px);
	position: sticky;
	top: calc(var(--header-h) + 1px);
}
.f-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.f-group > label,
.f-label {
	font-size: 12.5px;
	color: var(--muted);
	font-weight: 600;
}
.f-group input[type="text"],
.f-group input[type="number"],
.f-group select,
textarea {
	width: 100%;
	padding: 7px 9px;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	background: var(--paper);
}
.row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.chip {
	border: 1px solid var(--rule);
	background: var(--paper);
	padding: 3px 8px;
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 12.5px;
}
.chip[aria-pressed="true"] {
	background: var(--accent);
	color: var(--panel);
	border-color: var(--accent);
}
.check {
	display: flex;
	gap: 8px;
	align-items: center;
	font-size: 13px;
}
.hint {
	color: var(--muted);
	font-size: 12px;
}
main.results {
	padding: 16px 20px 40px;
	min-width: 0;
}
/* summary: one quiet line of figures above the results, not a row of KPI tiles */
.summary {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 28px;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--rule);
}
.tile {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.tile .k {
	font-size: 13px;
	color: var(--muted);
	order: 2;
}
.tile .v {
	font-family: var(--display);
	font-size: 20px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	order: 1;
}
.toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}
.toolbar .count {
	font-weight: 600;
}
.toolbar .spacer {
	flex: 1;
}
.tablewrap {
	overflow-x: auto;
	background: var(--panel);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
}
table {
	border-collapse: collapse;
	width: 100%;
}
th,
td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid var(--rule);
	vertical-align: top;
}
th {
	font-size: 12.5px;
	color: var(--muted);
	font-weight: 600;
	white-space: nowrap;
	background: var(--panel);
	position: sticky;
	top: 0;
}
th.sort {
	cursor: pointer;
	user-select: none;
}
th.sort:hover {
	color: var(--ink);
}
th .arr {
	font-size: 10px;
	margin-left: 3px;
}
td.n,
th.n {
	text-align: right;
	white-space: nowrap;
}
tbody tr.click {
	cursor: pointer;
}
tbody tr.click:hover {
	background: var(--accent-soft);
}
.emp-name {
	font-weight: 600;
}
#resBody td:first-child {
	min-width: 230px;
}
#resBody td:last-child {
	min-width: 150px;
}
.sub {
	color: var(--muted);
	font-size: 12.5px;
}
.pill {
	display: inline-block;
	padding: 1px 8px;
	border-radius: var(--radius);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	border: 1px solid transparent;
}
.p0 {
	background: var(--accent-soft);
	color: var(--accent);
}
.p1 {
	background: var(--warn-soft);
	color: var(--warn);
}
.p2 {
	background: var(--warn-soft);
	color: var(--warn);
	border-color: var(--warn);
}
.p3 {
	background: var(--paper);
	color: var(--ink);
	border-color: var(--rule);
}
.p4,
.p5 {
	background: var(--paper);
	color: var(--muted);
	border-color: var(--rule);
}
.lines {
	display: flex;
	gap: 3px;
	flex-wrap: wrap;
	max-width: 220px;
}
.ln {
	font-family: var(--mono);
	font-size: 10.5px;
	padding: 0 4px;
	border: 1px solid var(--rule);
	border-radius: 3px;
	color: var(--muted);
}
.ln.med {
	color: var(--ink);
	border-color: var(--ink);
}
.pager {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	margin-top: 10px;
}
.empty {
	padding: 40px;
	text-align: center;
	color: var(--muted);
}

/* pages */
.page {
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.card {
	background: var(--panel);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	padding: 16px;
}
.card h3 {
	font-size: 17px;
	margin-bottom: 4px;
}
.card .cap {
	color: var(--muted);
	font-size: 12.5px;
	margin-bottom: 10px;
}
.emp-head {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 18px;
}
.emp-head h2 {
	font-size: 28px;
	font-weight: 700;
}
.facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px 16px;
}
.fact .k {
	font-size: 12.5px;
	color: var(--muted);
	font-weight: 600;
}
.fact .v {
	font-weight: 500;
}
.bench {
	font-size: 12.5px;
	white-space: nowrap;
}
.bench.hi {
	color: var(--warn);
}
.bench.lo {
	color: var(--low);
}
.crumbs {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.crumbs .btn {
	white-space: nowrap;
}
.loading {
	padding: 60px 20px;
	text-align: center;
	color: var(--muted);
}
.notice {
	background: var(--accent-soft);
	border-radius: var(--radius);
	padding: 10px 14px;
	font-size: 13px;
}
.notice.warn {
	background: var(--warn-soft);
}
tr.hl td {
	background: var(--accent-soft);
}
.prose {
	max-width: 70ch;
}
.prose p,
.prose li {
	margin: 0 0 8px;
}
.grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
.bar {
	height: 6px;
	background: var(--rule);
	border-radius: 3px;
	overflow: hidden;
	min-width: 60px;
}
.bar > i {
	display: block;
	height: 100%;
	background: var(--accent);
}
.dialog-back {
	position: fixed;
	inset: 0;
	background: rgba(10, 15, 18, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 20;
	padding: 16px;
}
.dialog-back.open {
	display: flex;
}
.dialog {
	background: var(--panel);
	border-radius: var(--radius);
	padding: 18px;
	width: min(520px, 100%);
	display: flex;
	flex-direction: column;
	gap: 12px;
	border: 1px solid var(--rule);
}
.toast {
	position: fixed;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--ink);
	color: var(--paper);
	padding: 9px 16px;
	border-radius: var(--radius);
	font-size: 13px;
	z-index: 30;
	display: none;
}
.fb-item {
	border-top: 1px solid var(--rule);
	padding: 10px 0;
}
.fb-item:first-child {
	border-top: 0;
}

@media (max-width: 900px) {
	.workbench {
		grid-template-columns: 1fr;
	}
	aside.filters {
		position: static;
		max-height: none;
		border-right: 0;
		border-bottom: 1px solid var(--rule);
	}
	.summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.emp-head,
	.grid2 {
		grid-template-columns: 1fr;
	}
	.facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (prefers-reduced-motion: no-preference) {
	tbody tr.click {
		transition: background 0.12s;
	}
}
