:root {
	--bg: #f7f7f4;
	--surface: #ffffff;
	--text: #26312b;
	--muted: #68736c;
	--line: #dce2dc;
	--accent: #367152;
	--accent-dark: #24543b;
	--tag-bg: #edf4ee;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
	line-height: 1.65;
}

.page-shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 80px; }
.page-header { margin-bottom: 32px; }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.3; }
.page-description { margin-bottom: 0; color: var(--muted); }

.search-panel, .result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.search-panel { padding: 24px; }
.search-form { display: flex; gap: 10px; }
.search-form input { min-width: 0; flex: 1; height: 48px; padding: 0 14px; border: 1px solid #bdc8c0; border-radius: 8px; color: var(--text); font: inherit; }
.search-form input:focus { outline: 3px solid #cde3d4; border-color: var(--accent); }
button { height: 48px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
button:hover { background: var(--accent-dark); }
.loading-message { margin: 14px 0 0; color: var(--accent); font-size: .9rem; }

.search-details { margin-top: 20px; border-top: 1px solid var(--line); }
.search-details summary { padding: 15px 0 0; cursor: pointer; color: var(--accent-dark); font-weight: 700; }
.search-details__content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 16px; }
.condition-item { display: flex; flex-direction: column; padding: 12px; background: #f8faf8; border-radius: 8px; font-size: .9rem; }
.condition-label { margin-bottom: 2px; color: var(--muted); font-size: .78rem; }

.results-section { margin-top: 40px; }
.results-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
h2 { margin-bottom: 0; font-size: 1.25rem; }
#result-count { margin-bottom: 0; color: var(--muted); font-size: .9rem; }
.results-list { display: grid; gap: 14px; }
.result-card { padding: 22px 24px; }
.result-meta { margin: 0 0 15px; color: var(--accent-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; font-weight: 700; line-height: 1.7; }
.result-keywords { margin: 0 0 14px; color: var(--text); font-size: .92rem; }
.result-keywords__label { margin-right: 8px; color: var(--muted); font-weight: 700; }
.snippet { display: -webkit-box; overflow: hidden; margin: 0; color: #445048; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.empty-message { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
	.page-shell { width: min(100% - 24px, 920px); padding-top: 40px; }
	.search-panel, .result-card { padding: 18px; }
	.search-form { flex-direction: column; }
	.search-form button { width: 100%; }
	.search-details__content { grid-template-columns: 1fr; }
	.result-meta { font-size: .8rem; }
}
