:root {
	--bg: #f6f7fb;
	--panel: #ffffff;
	--line: #d7dcea;
	--text: #0c1728;
	--muted: #5b667a;
	--primary: #4a4be0;
	--primary-soft: #eef0ff;
	--ink: #081d31;
	--shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
	--font-sans: "Pretendard Variable", Pretendard, "Inter", "Noto Sans KR", "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
	--font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	--sidebar-width: 260px;
	--footer-height: 52px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 14px;
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
	font: inherit;
}

button {
	cursor: pointer;
}

a {
	color: inherit;
}

.app-shell {
	height: 100vh;
	min-height: 100vh;
	display: grid;
	grid-template-columns: var(--sidebar-width) 1fr;
	grid-template-rows: 58px minmax(0, 1fr) var(--footer-height);
	overflow: hidden;
	transition: grid-template-columns .18s ease;
}

body.sidebar-collapsed .app-shell {
	grid-template-columns: 0 1fr;
}

.topbar {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 58px;
	padding: 0 18px;
	background: #ffffff;
	border-bottom: 1px solid #e0e4ef;
	position: sticky;
	top: 0;
	z-index: 40;
}

.topbar-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.brand {
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0;
	white-space: nowrap;
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1;
	min-width: 0;
}

.brand strong {
	color: #1f2df2;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0;
}

.brand small {
	color: #2f3c52;
	font-size: 10px;
	font-weight: 650;
	letter-spacing: .14em;
}

.sidebar-toggle,
.icon-button {
	width: 34px;
	height: 34px;
	border: 1px solid transparent;
	border-radius: 7px;
	background: transparent;
	color: #233651;
	display: inline-grid;
	place-items: center;
	font-weight: 800;
	flex: 0 0 auto;
}

.sidebar-toggle {
	border-color: #cfd6e6;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.sidebar-toggle:hover,
.icon-button:hover {
	background: #eef2fb;
}

.sidebar-toggle span {
	display: block;
	width: 17px;
	height: 2px;
	background: currentColor;
	border-radius: 999px;
}

.sidebar-toggle span + span {
	margin-top: 4px;
}

.text-icon {
	font-size: 13px;
}

.top-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.language-select {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
}

.language-select select {
	height: 34px;
	border: 1px solid #cfd6e6;
	border-radius: 7px;
	background: #ffffff;
	color: #172033;
	padding: 0 28px 0 10px;
	font-weight: 700;
	outline: 0;
}

.sidebar {
	grid-row: 2;
	position: relative;
	background: #fbfcff;
	border-right: 1px solid #e0e4ef;
	padding: 18px 12px;
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0;
	transition: transform .18s ease, opacity .18s ease;
}

.sidebar-resizer {
	position: absolute;
	top: 0;
	right: 0;
	width: 16px;
	height: 100%;
	cursor: col-resize;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sidebar-resizer::before {
	content: "";
	position: absolute;
	top: 12px;
	right: 0;
	width: 2px;
	height: calc(100% - 24px);
	border-radius: 999px;
	background: #e1e6f0;
	transition: background .15s ease;
}

.sidebar-resizer:hover::before,
body.sidebar-resizing .sidebar-resizer::before {
	background: #aeb8cf;
}

.resizer-grip {
	position: relative;
	width: 12px;
	height: 40px;
	border: 1px solid #cbd4e5;
	border-radius: 999px;
	background: #ffffff;
	box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.resizer-grip::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #7b879d;
	box-shadow: 0 -8px 0 #7b879d, 0 8px 0 #7b879d;
	transform: translate(-50%, -50%);
}

.sidebar-resizer:hover .resizer-grip,
body.sidebar-resizing .resizer-grip {
	border-color: #8fa0bd;
	box-shadow: 0 5px 14px rgba(15, 23, 42, 0.18);
	transform: scale(1.03);
}

body.sidebar-resizing {
	cursor: col-resize;
	user-select: none;
}

body.sidebar-collapsed .sidebar {
	transform: translateX(-100%);
	opacity: 0;
	pointer-events: none;
}

.tool-list {
	display: grid;
	gap: 7px;
	padding-bottom: 18px;
}

.tool-link {
	position: relative;
	min-height: 42px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #213653;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px 0 20px;
	text-align: left;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease, transform .15s ease;
}

.tool-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: .78;
}

.tool-link span[data-tool-label] {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tool-link::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 50%;
	width: 3px;
	height: 18px;
	border-radius: 999px;
	background: #d8deec;
	transform: translateY(-50%);
}

.tool-link:hover {
	background: #f0f4fb;
	color: #102640;
}

.tool-link.active {
	background: var(--primary-soft);
	color: #2c23c8;
	font-weight: 700;
}

.tool-link.active .tool-icon {
	opacity: 1;
}

.tool-link.active::before {
	background: var(--primary);
}

.workspace {
	grid-column: 2;
	grid-row: 2;
	min-height: 0;
	padding: 24px 28px;
	overflow-y: auto;
	overflow-x: hidden;
}

.page-head {
	max-width: 1120px;
	margin: 0 auto 20px;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
}

.breadcrumb {
	color: var(--muted);
	font-size: 12px;
	margin-bottom: 7px;
}

.page-head h1 {
	margin: 0;
	font-size: clamp(25px, 3vw, 34px);
	line-height: 1.14;
	letter-spacing: 0;
	font-weight: 800;
}

.page-head p {
	margin: 7px 0 0;
	max-width: 680px;
	color: #344054;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 400;
}

.page-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.tool-surface {
	max-width: 1120px;
	margin: 0 auto;
}

.noscript-panel {
	max-width: 1120px;
	margin: 22px auto 0;
	border: 1px solid #d8deec;
	border-radius: 8px;
	background: #ffffff;
	padding: 14px 16px;
	color: #344054;
}

.seo-tool-content {
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #ffffff;
	box-shadow: var(--shadow);
	padding: 18px;
	color: #22324a;
}

.tool-info {
	margin-top: 20px;
}

.seo-content-status {
	display: inline-flex;
	align-items: center;
	height: 24px;
	border-radius: 999px;
	background: #eef0ff;
	color: #342ec7;
	font-size: 12px;
	font-weight: 800;
	padding: 0 9px;
	margin-bottom: 10px;
}

.seo-tool-content h2,
.seo-tool-content h3 {
	margin: 0;
	color: var(--text);
}

.seo-tool-content h2 {
	font-size: 18px;
	line-height: 1.3;
}

.seo-tool-content h3 {
	font-size: 14px;
	line-height: 1.3;
}

.seo-tool-content p {
	margin: 8px 0 0;
	line-height: 1.6;
	color: #40506a;
}

.seo-content-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: 16px;
}

.seo-content-grid ul,
.seo-content-grid ol {
	margin: 8px 0 0;
	padding-left: 18px;
	color: #40506a;
	line-height: 1.6;
}

.seo-content-note {
	border-top: 1px solid #e3e8f2;
	padding-top: 12px;
}

.site-footer {
	grid-column: 1 / -1;
	grid-row: 3;
	height: var(--footer-height);
	border-top: 1px solid #d9dfec;
	background: #ffffff;
	color: #40506a;
	z-index: 35;
}

.footer-inner {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 0 18px;
}

.footer-summary {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.footer-summary strong {
	display: block;
	color: var(--text);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.1;
}

.footer-summary span {
	flex: 0 0 auto;
	color: #31435e;
	font-size: 9px;
	font-weight: 750;
	letter-spacing: .14em;
}

.footer-summary p {
	margin: 0 0 0 6px;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.footer-bottom a {
	color: #415575;
	text-decoration: none;
	font-size: 12px;
	line-height: 1;
}

.footer-bottom a:hover {
	color: var(--primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	color: #6a768a;
	font-size: 12px;
	white-space: nowrap;
}

.scrim {
	display: none;
}

@media (max-width: 900px) {
	.app-shell,
	body.sidebar-collapsed .app-shell {
		grid-template-columns: 1fr;
		grid-template-rows: 58px minmax(0, 1fr) var(--footer-height);
	}

	.sidebar {
		position: fixed;
		inset: 58px auto var(--footer-height) 0;
		width: min(280px, 86vw);
		min-height: 0;
		z-index: 70;
		transform: translateX(-105%);
		opacity: 1;
		pointer-events: auto;
	}

	.sidebar-resizer {
		display: none;
	}

	body.sidebar-open .sidebar {
		transform: translateX(0);
	}

	body.sidebar-open .scrim {
		display: block;
		position: fixed;
		inset: 58px 0 var(--footer-height);
		background: rgba(8, 21, 40, 0.38);
		z-index: 60;
	}

	.topbar {
		padding: 0 12px;
	}

	.workspace {
		grid-column: 1;
		grid-row: 2;
		padding: 20px 14px;
	}

	.page-head,
	.seo-content-grid {
		grid-template-columns: 1fr;
		display: grid;
	}

	.page-actions {
		justify-content: flex-start;
	}

	.footer-inner {
		gap: 10px;
		padding: 0 12px;
	}

	.footer-summary p {
		display: none;
	}

	.footer-bottom span {
		display: none;
	}
}

@media (max-width: 560px) {
	.brand strong {
		font-size: 16px;
	}

	.brand small {
		font-size: 9px;
	}

	.footer-summary span {
		font-size: 8px;
	}
}
