/* Pocket site styles. Colors come from brand.css (DabomWorks brand kit). */
:root {
	--bg: #ffffff;
	--surface: #f4f7f7;
	--border: #dde1ea;
	--text: var(--dw-ink);
	--text-soft: var(--dw-ink-soft);
	--heading: var(--dw-teal-dark);
	--accent: var(--dw-teal);
	--accent-hover: var(--dw-teal-dark);
	--radius: 10px;
	--gutter: 16px;
	--width: 960px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font-family: var(--dw-font-body);
	font-size: 16px;
	line-height: 1.7;
	word-break: keep-all;
	overflow-wrap: break-word;
}

h1,
h2,
h3 {
	color: var(--heading);
	line-height: 1.35;
	margin: 0 0 0.5em;
}
h1 {
	font-size: clamp(1.6rem, 4vw, 2.1rem);
	font-weight: 700;
}
h2 {
	font-size: 1.3rem;
	margin-top: 2em;
}
h3 {
	font-size: 1.05rem;
	margin-top: 1.5em;
}
p {
	margin: 0 0 1em;
}
a {
	color: var(--accent);
}
a:hover {
	color: var(--accent-hover);
}
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.container {
	width: 100%;
	max-width: var(--width);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* Header */
.site-header {
	border-bottom: 1px solid var(--border);
	background: var(--bg);
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 60px;
	gap: 16px;
}
.site-header__home {
	display: block;
	padding: 8px 0;
}
.site-header__nav a {
	color: var(--text-soft);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
}
.site-header__nav a:hover {
	color: var(--accent);
}

/* Page */
.page {
	flex: 1;
	padding-top: 40px;
	padding-bottom: 64px;
}
.tool-head {
	margin-bottom: 28px;
}
.tool-head__lead {
	color: var(--text-soft);
	font-size: 1.05rem;
	max-width: 46em;
}
.privacy-note {
	display: inline-block;
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--surface);
	color: var(--dw-teal-dark);
	font-size: 0.85rem;
}

/* Tool area */
.tool {
	margin-bottom: 32px;
}
.tool-panel {
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
}
.field-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
}
.field {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--bg);
	color: var(--text);
	font: inherit;
	line-height: 1.6;
}
.field:focus {
	border-color: var(--accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(11, 107, 115, 0.15);
}
textarea.field {
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, Consolas, 'Noto Sans KR', monospace;
	font-size: 0.95rem;
}
.field-hint {
	margin: 8px 0 0;
	color: var(--text-soft);
	font-size: 0.875rem;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--accent);
	border-radius: 8px;
	background: var(--accent);
	color: #ffffff;
	font: inherit;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}
.button:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
	color: #ffffff;
}
.button--ghost {
	background: transparent;
	color: var(--accent);
}
.button--ghost:hover {
	background: var(--surface);
	color: var(--accent-hover);
}

/* Flow call to action */
.flow-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 40px;
	padding: 20px;
	border-radius: var(--radius);
	border-left: 4px solid var(--dw-green);
	background: var(--surface);
}
.flow-cta p {
	margin: 0;
	flex: 1 1 280px;
}

/* Long-form description below the tool */
.prose {
	max-width: 46em;
}
.prose ul,
.prose ol {
	padding-left: 1.4em;
}

/* Closing link to Flow at the bottom of a tool page */
.flow-more {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}
.flow-more__label {
	margin: 0 0 4px;
	color: var(--text-soft);
	font-size: 0.925rem;
}
.flow-more__link {
	font-weight: 500;
	text-decoration: none;
}

/* Tool list on the home page */
.tool-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tool-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.tool-card:hover {
	border-color: var(--accent);
	box-shadow: 0 4px 16px rgba(8, 63, 68, 0.08);
	color: var(--text);
}
.tool-card strong {
	color: var(--heading);
	font-size: 1.05rem;
}
.tool-card span {
	color: var(--text-soft);
	font-size: 0.925rem;
}

/* Footer */
.site-footer {
	background: var(--dw-dark-bg);
	color: #c4c8d2;
	font-size: 0.9rem;
}
.site-footer a {
	color: var(--dw-teal-on-dark);
}
.site-footer a:hover {
	color: #ffffff;
}
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 24px 48px;
	padding-top: 40px;
	padding-bottom: 24px;
}
.site-footer__brand {
	flex: 1 1 320px;
	max-width: 30em;
}
.site-footer__brand p {
	margin: 12px 0 0;
}
.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	padding-top: 16px;
	padding-bottom: 32px;
	border-top: 1px solid var(--dw-divider-on-dark);
	color: #8d93a3;
}

@media (max-width: 600px) {
	.page {
		padding-top: 28px;
	}
	.tool-panel,
	.flow-cta {
		padding: 16px;
	}
	.flow-cta .button {
		width: 100%;
	}
}

/* Notes under a tool title: privacy note and the 사용법 button */
.tool-head__notes {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0;
}
.guide-open {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 30px;
	padding: 0 12px;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: var(--bg);
	color: var(--accent);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
}
.guide-open::before {
	content: '?';
	display: inline-grid;
	place-items: center;
	width: 1.2em;
	height: 1.2em;
	border-radius: 50%;
	background: var(--accent);
	color: #ffffff;
	font-size: 0.8em;
	font-weight: 700;
}
.guide-open:hover {
	background: var(--surface);
	color: var(--accent-hover);
}
.guide-open--inline {
	font-size: 0.95rem;
	min-height: 36px;
}

/* 사용법 popup (guide.html in a <dialog>) */
.guide {
	width: min(760px, calc(100vw - 2 * var(--gutter)));
	max-height: min(86vh, 900px);
	padding: 0;
	border: 0;
	border-radius: var(--radius);
	box-shadow: 0 20px 60px rgba(8, 63, 68, 0.3);
	color: var(--text);
}
.guide::backdrop {
	background: rgba(20, 23, 31, 0.55);
}
.guide__panel {
	display: flex;
	flex-direction: column;
	max-height: inherit;
}
.guide__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 12px 24px;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
}
.guide__head h2 {
	margin: 0;
	font-size: 1.15rem;
}
.guide__head form {
	margin: 0;
}
.guide__close {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--text-soft);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.guide__close:hover {
	background: var(--bg);
	color: var(--text);
}
.guide__body {
	max-width: none;
	padding: 8px 24px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.guide__body h2 {
	margin-top: 1.6em;
	font-size: 1.1rem;
	scroll-margin-top: 8px;
}
.guide__toc {
	margin: 12px 0 0;
	padding: 10px 16px;
	border-radius: 8px;
	background: var(--surface);
	font-size: 0.92rem;
}
.guide__toc ol {
	margin: 0;
	padding-left: 1.3em;
	columns: 2 14em;
	column-gap: 24px;
}
.guide__toc a {
	text-decoration: none;
}
.guide__toc a:hover {
	text-decoration: underline;
}
body:has(.guide[open]) {
	overflow: hidden;
}
@media (max-width: 600px) {
	.guide {
		width: 100vw;
		max-width: 100vw;
		height: 100dvh;
		max-height: 100dvh;
		margin: 0;
		border-radius: 0;
	}
	.guide__panel {
		height: 100%;
	}
	.guide__head {
		padding-left: 16px;
	}
	.guide__body {
		flex: 1;
		padding: 8px 16px 24px;
	}
}
@media print {
	.guide,
	.guide-open {
		display: none !important;
	}
}
