:root {
	color-scheme: light;
	--text: #101828;
	--text-2: #475467;
	--text-3: #667085;
	--text-btn: #344054;
	--bg: #f6f7f9;
	--card: #fff;
	--line: #e4e7ec;
	--field: #d0d5dd;
	--link: #c4320a;
	--selected: #eff4ff;
	--bar: #3e63dd;
	--focus: #e8590c;
	--tile: #2e90fa;
	--tile-soft: #15b79e;
	--pill: #f9fafb;
	--pill-line: #eaecf0;
	font-family: Inter, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
}

button, input { font: inherit; color: inherit; }

.app {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: stretch;
}

.page {
	flex: 1 1 auto;
	min-width: 0;
	padding: 32px 40px;
}

.panel {
	flex: 0 0 clamp(480px, 38vw, 720px);
	display: flex;
	flex-direction: column;
	background: var(--card);
	border-left: 1px solid var(--line);
	padding: 0 40px 40px;
	container-type: inline-size;
}

.page-head {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 20px;
}

.page-head h1 {
	margin: 0;
	font-size: 28px;
	line-height: 36px;
	font-weight: 700;
}

.page-head p {
	margin: 4px 0 0;
	color: var(--text-2);
	font-size: 15px;
	line-height: 22px;
}

.tile {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.tile-lg {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	background: var(--tile);
}

.tile-sm {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--tile-soft);
}

.search {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--field);
	border-radius: 6px;
	background: var(--card);
	box-shadow: 0 1px 1px rgba(16, 24, 40, 0.05);
}

.search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: none;
	background: transparent;
	font-size: 14px;
	line-height: 20px;
}

.search input::placeholder { color: var(--text-3); }

.search button {
	display: flex;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.found {
	margin: 16px 0 8px;
	color: var(--text-2);
	font-size: 13px;
	line-height: 18px;
}

.list {
	margin-top: 20px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow: hidden;
}

.section, .request {
	display: flex;
	align-items: center;
	width: 100%;
	border: 0;
	border-bottom: 1px solid var(--line);
	background: var(--card);
	text-align: left;
	cursor: pointer;
	position: relative;
}

.section { gap: 8px; min-height: 44px; padding: 12px 20px; }
.request { min-height: 40px; padding: 10px 20px 10px 44px; }

.list .section:last-child,
.list .request:last-child { border-bottom: 0; }

.section span, .request span { font-size: 14px; line-height: 20px; }
.section span { flex: 1; font-weight: 600; }
.request span { flex: 1; font-weight: 500; }
.section b { color: var(--text-3); font-weight: 400; font-size: 13px; line-height: 18px; }
.section img { transition: transform 0.15s ease; }
.section[aria-expanded="true"] img { transform: rotate(90deg); }
.section.has-current { box-shadow: inset 3px 0 0 var(--bar); }
.request[aria-current="true"] { background: var(--selected); box-shadow: inset 3px 0 0 var(--bar); }
mark { background: transparent; font-weight: 700; }

.empty {
	margin-top: 20px;
	padding: 48px 24px;
	text-align: center;
}

.empty-title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.empty-text { margin: 8px auto 16px; max-width: 42rem; color: var(--text-2); font-size: 14px; line-height: 20px; }

.hint, .detail-head, .detail-body { max-width: 100%; }
.hint {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 8px;
}
.hint p { margin: 0; max-width: 400px; color: var(--text-2); font-size: 14px; line-height: 20px; }
.hint-title { color: var(--text); font-size: 16px; line-height: 24px; font-weight: 600; }

.detail-head { position: relative; padding-top: 24px; }
.detail-section { margin: 0; color: var(--text-2); font-size: 13px; line-height: 18px; }
.detail-head h2 { margin: 8px 0 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.detail-body { padding: 24px 0 32px; }
.detail-body h3 { margin: 0 0 12px; font-size: 14px; line-height: 20px; font-weight: 600; }
.detail-body section + section { margin-top: 24px; }

.back { display: none; }

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	padding: 2px 6px 2px 8px;
	border: 1px solid var(--pill-line);
	border-radius: 11px;
	background: var(--pill);
	color: var(--text-2);
	font-size: 12px;
	line-height: 18px;
	font-weight: 500;
	cursor: pointer;
}

.popover {
	position: absolute;
	z-index: 3;
	top: calc(100% + 8px);
	left: 0;
	width: 360px;
	max-width: calc(100% - 16px);
	display: flex;
	gap: 8px;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--card);
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}
.popover p { margin: 0; flex: 1; font-size: 14px; line-height: 20px; color: var(--text); }
.popover button, .sheet { border: 0; background: transparent; cursor: pointer; }

.example {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 8px;
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--card);
}
.example p { flex: 1 1 320px; margin: 0; font-size: 14px; line-height: 20px; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--field);
	border-radius: 6px;
	background: var(--card);
	box-shadow: 0 1px 1px rgba(16, 24, 40, 0.05);
	color: var(--text-btn);
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	cursor: pointer;
}
.btn-wide { width: 100%; }

.related { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.related button {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--link);
	font-size: 14px;
	line-height: 20px;
	text-align: left;
	cursor: pointer;
}

.scrim {
	position: fixed;
	inset: 56px 0 0;
	background: rgba(16, 24, 40, 0.5);
	z-index: 4;
}
.sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	padding: 8px 16px 16px;
	border-radius: 16px 16px 0 0;
	background: var(--card);
}
.sheet p { margin: 12px 0 16px; font-size: 16px; line-height: 24px; }
.sheet-handle {
	width: 36px;
	height: 5px;
	margin: 0 auto;
	border-radius: 99px;
	background: var(--field);
}

.live {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

:focus { outline: none; }
:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

@container (max-width: 480px) {
	.example { flex-direction: column; align-items: stretch; }
	.example .btn { width: 100%; }
}

@media (max-width: 1439px) {
	.page { padding: 24px 32px; }
	.panel { flex-basis: 480px; padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 1279px) {
	.page, .panel { padding: 24px; }
	.panel { flex-basis: 440px; }
}

@media (max-width: 1023px) {
	.app { display: block; }
	.panel {
		position: fixed;
		top: 56px;
		right: 0;
		bottom: 0;
		z-index: 5;
		width: min(480px, calc(100vw - 48px));
		overflow: auto;
		transform: translateX(100%);
	}
	.panel.is-open { transform: none; }
	.panel.is-open ~ .scrim, body.drawer .scrim { display: block; }
}

@media (max-width: 767px) {
	.page { padding: 16px; }
	.page-head h1 { font-size: 22px; line-height: 28px; }
	.tile-lg { display: none; }
	.search { height: 44px; }
	.search input { font-size: 16px; }
	.section, .request { min-height: 48px; }
	.btn { height: 44px; }
	.panel {
		left: 0;
		width: 100%;
		padding: 0 16px 24px;
	}
	.back {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		height: 48px;
		margin: 0 -16px 8px;
		padding: 0 16px;
		border: 0;
		border-bottom: 1px solid var(--line);
		background: var(--card);
		font-size: 16px;
		line-height: 24px;
		cursor: pointer;
	}
	.back img { transform: rotate(180deg); }
	.example p { font-size: 16px; line-height: 24px; }
	.hint { min-height: 70vh; }
	.popover { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.section img, .panel { transition: none; }
}

body.drawer .scrim { display: block; }
.scrim { display: none; }
