/* Documents shell (Mason, 8 Oct 2026): the shared Taskd header and the access states.
   Kit 0.2.2's component names, drawn in app.taskd.ai's own palette (warm neutrals, near-black ink, the highlighter), which
   Alex likes and the admin dashboard follows: ink primary buttons, the app's type, marker-yellow highlights and no brand
   hue (kit 0.2.2, Alex 8 Oct). The kit's tokens are mapped onto the app's, so kit components (menu, hints,
   cards, drawer) match the rest of the page in light and dark. Loaded after kit.css and styles.css. */
:root[data-theme],
:root:not([data-theme]) {
	/* Kit 0.2.2 (ink only, Alex 8 Oct) on app.taskd.ai's surfaces and type */
	--tk-bg: var(--canvas);
	--tk-surface: var(--surface);
	--tk-raised: var(--surface-2);
	--tk-line: var(--line);
	--tk-line-strong: var(--line-2);
	--tk-ink: var(--ink);
	--tk-muted: var(--muted);
	--tk-sans: var(--font-sans);
	--tk-serif: var(--font-serif);
	--tk-mono: var(--font-mono);
	--tk-radius: var(--radius);
	/* the app's lime becomes the kit's marker yellow, its green ring the ink ring, its statuses the kit's: no brand hue */
	--marker: var(--tk-highlight);
	--accent: var(--tk-highlight);
	--accent-2: color-mix(in srgb, var(--tk-highlight) 82%, var(--tk-ink));
	--accent-soft: color-mix(in srgb, var(--tk-highlight) 60%, transparent);
	--accent-ink: var(--tk-ink);
	--lime-text: #fbeea0; /* on the always-dark stage panels */
	--mint: var(--tk-ok);
	--ring: var(--tk-focus);
	--ok: var(--tk-ok);
	--warn: var(--tk-wait);
	--err: var(--tk-danger);
}

/* header */
.es-shell {
	gap: 10px;
	min-height: 56px;
	padding: 8px 24px;
}
.es-mark {
	color: var(--ink);
	padding: 6px 2px;
}
.es-logo {
	display: block;
	height: 17px;
	width: auto;
}
.es-product {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: none;
	color: var(--ink-2);
	font: 500 14.5px/1 var(--font-sans);
	cursor: pointer;
}
.es-product:hover {
	background: var(--hover);
	color: var(--ink);
}
.es-product-static {
	cursor: default;
}
.es-product-static:hover {
	background: none;
}
.es-chevron {
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.7;
}
.es-me {
	gap: 8px;
	padding-inline: 4px 10px;
	color: var(--ink-2);
}
.es-avatar {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--tk-highlight);
	color: var(--tk-ink);
	font: 600 11.5px/1 var(--font-sans);
	letter-spacing: 0.02em;
}
.es-me-name {
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13.5px;
}
.es-shell .tk-button.tk-primary {
	font-weight: 600;
}

/* Developers: one row of links under the header, scrollable on a phone */
.es-subnav {
	display: flex;
	gap: 2px;
	overflow-x: auto;
	padding: 8px 24px;
	border-bottom: 1px solid var(--line);
	scrollbar-width: none;
}
.es-subnav::-webkit-scrollbar {
	display: none;
}
.es-subnav a {
	flex: none;
	padding: 6px 12px;
	border-radius: 999px;
	color: var(--muted);
	font-size: 13.5px;
	text-decoration: none;
}
.es-subnav a:hover {
	color: var(--ink);
}
.es-subnav a[aria-current="page"] {
	background: var(--sunken);
	color: var(--ink);
	font-weight: 500;
}

/* only when something is wrong */
.es-degraded {
	margin: 0;
	padding: 9px 24px;
	border-bottom: 1px solid var(--line);
	background: var(--warn-soft);
	color: var(--warn);
	font-size: 13.5px;
}

.es-main {
	max-width: 1180px;
}

/* access states: signed out, waiting, not found */
.es-state-page {
	min-height: calc(100vh - 57px);
	display: grid;
	place-items: start center;
	padding: 12vh 16px 64px;
}
.es-state-card,
.es-hero {
	width: min(560px, 100%);
}
.es-hero {
	width: min(680px, 100%);
}
.es-state-card h1,
.es-hero h1 {
	margin: 10px 0 14px;
	font: 600 clamp(30px, 5vw, 44px) / 1.08 var(--font-display);
	letter-spacing: -0.03em;
}
.es-state-card p,
.es-hero p {
	color: var(--ink-2);
	font-size: 15.5px;
}
.es-lede {
	max-width: 56ch;
}
.es-hero .actions {
	margin: 26px 0 18px;
}
.es-quiet,
.es-state-card .es-quiet,
.es-hero .es-quiet {
	color: var(--muted);
	font-size: 13.5px;
}
.es-who {
	margin-top: 26px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	color: var(--muted) !important;
	font-size: 13.5px !important;
	overflow-wrap: anywhere;
}
.es-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.es-main .es-state-card {
	margin: 8vh auto;
}

/* the classic view (staff): a line saying so, and the way back */
.es-classic {
	position: relative;
	z-index: 30;
	margin: 0;
	padding: 7px 16px;
	background: var(--stage);
	color: var(--stage-ink);
	font-size: 13px;
	text-align: center;
}
.es-classic a {
	color: var(--lime-text);
}

@media (max-width: 640px) {
	.es-shell {
		padding: 8px 12px;
		gap: 4px;
	}
	.es-me-name {
		display: none;
	}
	.es-me {
		padding-inline: 4px;
	}
	.es-subnav {
		padding: 8px 12px;
	}
	.es-degraded {
		padding: 9px 16px;
	}
	.es-state-page {
		padding-top: 8vh;
	}
	.es-hero .actions .btn {
		flex: 1 1 100%;
		justify-content: center;
	}
}

/* programmatic focus on the page after navigation draws no box; keyboard focus keeps the ring */
#main:focus {
	outline: none;
}
.es-quiet-btn {
	border-color: transparent;
	background: transparent;
	box-shadow: none;
}

/* Home until the drop zone */
.es-home-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}
.es-home-head h1 {
	margin: 0;
	font: 600 clamp(26px, 4vw, 34px) / 1.1 var(--font-display);
	letter-spacing: -0.025em;
}
.es-docs {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
}
.es-docs li + li {
	border-top: 1px solid var(--line);
}
.es-docs a {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 16px;
	padding: 14px 18px;
	color: var(--ink);
	text-decoration: none;
}
.es-docs a:hover {
	background: var(--hover);
}
.es-docs strong {
	font-weight: 500;
	overflow-wrap: anywhere;
}
.es-docs span {
	color: var(--muted);
	font-size: 13px;
}
.es-empty {
	margin: 6vh auto;
	text-align: left;
}
.es-empty h2 {
	margin: 0 0 8px;
	font: 600 20px/1.3 var(--font-display);
}

/* Developers on a phone: the row fades at the edge, so more links read as more */
@media (max-width: 640px) {
	.es-subnav {
		-webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
		mask-image: linear-gradient(to right, #000 82%, transparent);
	}
}

/* The workspace sidebar (Alex, 8 Oct: keep the sidebar), on app.taskd.ai's own sidebar classes from styles.css */
.es-sidebar .sidebar-brand {
	padding: 6px 10px 16px;
}
.es-sidebar .es-mark {
	display: inline-flex;
	color: var(--ink);
}
.es-ws {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	height: 42px;
	margin-bottom: 6px;
	padding: 0 10px 0 7px;
	border: 1px solid var(--line);
	border-radius: 11px;
	background: var(--surface);
	box-shadow: var(--shadow-xs);
	color: var(--ink);
	font: 600 13.5px/1 var(--font-sans);
	text-align: left;
	cursor: pointer;
}
.es-ws:hover {
	border-color: var(--line-2);
}
.es-ws-initial {
	display: grid;
	flex: none;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--ink);
	color: var(--canvas);
	font-size: 11.5px;
}
.es-ws-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.es-count {
	margin-left: auto;
	color: var(--muted);
	font-size: 12px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.es-profile {
	width: 100%;
	border-right: 0;
	border-bottom: 0;
	border-left: 0;
	background: none;
	color: var(--ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.es-profile .profile-text strong {
	display: block;
	overflow: hidden;
	font-size: 13.5px;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.es-profile .profile-text small {
	display: block;
	overflow: hidden;
	color: var(--muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}
.es-avatar-big {
	background: var(--tk-highlight);
	color: var(--tk-ink);
	box-shadow: none;
}

/* an area's title and tabs */
.es-areahead {
	margin: 0 0 22px;
	border-bottom: 1px solid var(--line);
}
.es-areahead h1 {
	margin: 4px 0 12px;
	font: 600 clamp(26px, 3.4vw, 34px) / 1.1 var(--font-display);
	letter-spacing: -0.025em;
}
.es-tabs {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	scrollbar-width: none;
}
.es-tabs::-webkit-scrollbar {
	display: none;
}
.es-tabs a {
	flex: none;
	padding: 8px 0 10px;
	border-bottom: 2px solid transparent;
	color: var(--muted);
	font-size: 14.5px;
	text-decoration: none;
}
.es-tabs a:hover {
	color: var(--ink);
}
.es-tabs a[aria-current="page"] {
	border-bottom-color: var(--ink);
	color: var(--ink);
	font-weight: 600;
}
.es-tools strong {
	display: block;
}

/* the phone: a top bar and a bottom bar, no sidebar */
.es-phonebar,
.es-bottombar {
	display: none;
}
@media (max-width: 860px) {
	.es-layout .es-sidebar {
		display: none;
	}
	.es-phonebar {
		display: flex;
	}
	.es-bottombar {
		position: fixed;
		z-index: 25;
		right: 0;
		bottom: 0;
		left: 0;
		display: flex;
		justify-content: space-around;
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--line);
		background: color-mix(in srgb, var(--canvas) 92%, transparent);
		backdrop-filter: blur(12px);
	}
	.es-bottombar a {
		display: grid;
		flex: 1;
		justify-items: center;
		gap: 2px;
		padding: 4px 0;
		color: var(--muted);
		font-size: 11.5px;
		text-decoration: none;
	}
	.es-bottombar a[aria-current="page"] {
		color: var(--ink);
		font-weight: 600;
	}
	.es-bottombar .icon {
		width: 20px;
		height: 20px;
	}
	.es-layout .es-main {
		padding-bottom: 96px;
	}
	.es-tabs {
		gap: 18px;
		-webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
		mask-image: linear-gradient(to right, #000 85%, transparent);
	}
}
