/* PDFly — main stylesheet */

:root {
	--brand: #4f46e5;
	--ink: #1c1d22;
	--muted: #5f6370;
	--line: #e6e7eb;
	--bg: #f5f6f8;
	--card: #fff;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(16, 18, 24, .06), 0 4px 16px rgba(16, 18, 24, .06);
	--shadow-hover: 0 2px 4px rgba(16, 18, 24, .08), 0 12px 32px rgba(16, 18, 24, .1);
	--max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000;
	top: 8px; left: 8px; padding: 8px 16px; background: #fff; border-radius: 6px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 48px 20px; }
.container.narrow { max-width: 780px; }

/* ---------- header ---------- */

.site-header {
	background: #fff;
	border-bottom: 1px solid var(--line);
	position: sticky; top: 0; z-index: 50;
}
.admin-bar .site-header { top: 32px; }
.header-inner {
	max-width: var(--max); margin: 0 auto; padding: 0 20px;
	height: 64px; display: flex; align-items: center; gap: 32px;
}
.text-logo {
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--ink);
}
.text-logo:hover { text-decoration: none; }
.logo-mark {
	width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff;
	display: inline-grid; place-items: center;
}
.logo-mark svg { width: 18px; height: 18px; fill: currentColor; }
.custom-logo { max-height: 40px; width: auto; }

.site-nav { flex: 1; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav .menu > li { position: relative; }
.site-nav .menu > li > a {
	display: block; padding: 20px 12px; font-weight: 600; font-size: 14px;
	color: var(--ink); text-transform: uppercase; letter-spacing: .02em;
}
.site-nav .menu > li > a:hover { color: var(--brand); text-decoration: none; }
.site-nav .menu-item-has-children > a::after { content: " ▾"; font-size: 11px; }

.site-nav .sub-menu,
.site-nav .mega-panel {
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow-hover); padding: 12px;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
	list-style: none; margin: 0;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu,
.site-nav li:hover > .mega-panel, .site-nav li:focus-within > .mega-panel {
	opacity: 1; visibility: visible; transform: none;
}
.site-nav .sub-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.site-nav .sub-menu a:hover { background: var(--bg); text-decoration: none; }

.site-nav .mega-panel { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 8px 24px; padding: 24px; left: -320px; }
.mega-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.mega-col ul { list-style: none; margin: 0; padding: 0; }
.mega-col a, .mini-tools a {
	display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px;
	color: var(--ink); font-size: 14px; font-weight: 500;
}
.mega-col a:hover, .mini-tools a:hover { background: var(--bg); text-decoration: none; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.screen-reader-text) { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- hero & tool grid ---------- */

.hero { text-align: center; padding: 64px 20px 28px; max-width: 860px; margin: 0 auto; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.03em; }
.hero p { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); margin: 0; }

.home-tools { max-width: var(--max); margin: 0 auto; padding: 16px 20px 56px; }
.tool-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tool-filter button {
	border: 1px solid var(--line); background: #fff; border-radius: 999px;
	padding: 8px 18px; font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s;
}
.tool-filter button:hover { border-color: var(--ink); }
.tool-filter button.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tool-card {
	background: var(--card); border-radius: var(--radius); padding: 24px;
	box-shadow: var(--shadow); color: var(--ink); border: 1px solid transparent;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--tool); text-decoration: none; }
.tool-card h3 { font-size: 19px; margin: 14px 0 6px; }
.tool-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

.tool-icon {
	width: 48px; height: 48px; border-radius: 12px; display: inline-grid; place-items: center;
	color: #fff; background: var(--tool, var(--brand)); flex-shrink: 0;
}
.tool-icon.sm { width: 28px; height: 28px; border-radius: 7px; }
.tool-icon.sm svg { width: 16px; height: 16px; }

.features {
	max-width: var(--max); margin: 0 auto 64px; padding: 0 20px;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.feature { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature-icon { color: var(--brand); display: block; margin-bottom: 10px; }
.feature h3 { font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- tool app ---------- */

.pdfly-app { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.stage-upload, .stage-busy, .stage-done { text-align: center; padding: 56px 0 48px; }
.stage-upload h1, .stage-done h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 680px; margin: 0 auto 32px; }

.dropzone {
	max-width: 680px; margin: 0 auto; padding: 40px 20px;
	border: 2px dashed transparent; border-radius: 20px; transition: .15s;
}
.pdfly-app.is-dropping .dropzone { border-color: var(--tool); background: color-mix(in srgb, var(--tool) 6%, transparent); }
.btn-upload {
	display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
	background: var(--tool); color: #fff; font-size: 22px; font-weight: 700;
	padding: 22px 48px; border-radius: 14px;
	box-shadow: 0 6px 20px color-mix(in srgb, var(--tool) 40%, transparent); transition: .15s;
}
.btn-upload:hover { transform: translateY(-1px); filter: brightness(1.05); }
.drop-hint { color: var(--muted); margin: 14px 0 0; }
.privacy-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-top: 8px; }
.privacy-note svg { width: 16px; height: 16px; }

/* workspace */
.stage-work { display: grid; grid-template-columns: 1fr 340px; gap: 0; min-height: 70vh; margin: 0 -20px; }
.work-main { padding: 24px; position: relative; }
.pdfly-app.is-dropping .work-main { outline: 2px dashed var(--tool); outline-offset: -10px; border-radius: 16px; }
.work-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.tb-info { color: var(--muted); font-size: 14px; margin-left: auto; }
.btn-ghost {
	background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px;
	font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; align-content: start; }
.cards-pages { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.card {
	position: relative; background: #fff; border-radius: var(--radius); padding: 12px;
	box-shadow: var(--shadow); border: 2px solid transparent; transition: .15s; user-select: none;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card .thumb {
	height: 190px; display: grid; place-items: center; overflow: hidden;
	background: var(--bg); border-radius: 8px; transition: transform .2s;
}
.cards-pages .card .thumb { height: 170px; background: transparent; overflow: visible; }
.card .thumb canvas, .card .thumb img {
	max-width: 100%; max-height: 100%; width: auto; height: auto; display: block;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .15); object-fit: contain;
}
.card-name { font-size: 13px; font-weight: 600; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
.card:not(.page-card) .card-meta { text-align: left; margin-top: 0; }
.card-actions {
	position: absolute; top: 6px; right: 6px; display: flex; gap: 4px;
	opacity: 0; transition: .15s;
}
.card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; }
@media (hover: none) { .card-actions { opacity: 1; } }
.card-actions button {
	width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--ink); color: #fff; font-size: 13px; line-height: 1; display: grid; place-items: center;
}
.card-actions button:hover { background: var(--tool); }
.is-draggable { cursor: grab; }
.is-dragging { opacity: .4; }
.drop-target { border-color: var(--tool); border-style: dashed; }

.page-card { cursor: pointer; }
.page-badge {
	position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%;
	display: none; place-items: center; color: #fff; font-weight: 700; font-size: 14px; z-index: 2;
}
.page-card.is-selected { border-color: var(--tool); }
.page-card.is-selected .page-badge { display: grid; background: var(--tool); }
.sel-extract-pages.is-selected .page-badge::before { content: "✓"; }
.sel-remove-pages.is-selected .page-badge::before { content: "✕"; }
.sel-remove-pages.is-selected .thumb { opacity: .35; }
.loading-cards { grid-column: 1 / -1; display: grid; place-items: center; min-height: 300px; }

.file-badge {
	width: 96px; height: 120px; border-radius: 8px; display: grid; place-items: center;
	background: #fff; border: 2px solid var(--tool); color: var(--tool); font-weight: 800; font-size: 22px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

/* sign tool */
.cards-sign { display: block; }
.tb-page { font-size: 14px; font-weight: 600; min-width: 90px; text-align: center; }
.btn-ghost:disabled { opacity: .4; cursor: default; }
.sign-stage { display: flex; justify-content: center; }
.sign-page { position: relative; display: inline-block; line-height: 0; cursor: crosshair; box-shadow: var(--shadow-hover); background: #fff; min-height: 200px; min-width: 200px; }
.sign-page > .spinner { margin: 80px; }
.sign-page canvas { display: block; max-width: 100%; height: auto; }
.sig-overlay {
	position: absolute; cursor: move; touch-action: none; user-select: none;
	outline: 2px dashed var(--tool); outline-offset: 2px; background: color-mix(in srgb, var(--tool) 6%, transparent);
}
.sig-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; }
.sig-tabs button { border: 0; background: none; padding: 8px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.sig-tabs button.is-active { background: #fff; box-shadow: var(--shadow); }
.sig-pad { width: 100%; height: auto; aspect-ratio: 600 / 220; border: 1px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.extra-links { display: flex; flex-direction: column; gap: 6px; }

/* side panel */
.work-side {
	background: #fff; border-left: 1px solid var(--line); padding: 24px;
	display: flex; flex-direction: column; gap: 16px;
	position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
.admin-bar .work-side { top: 96px; height: calc(100vh - 96px); }
.work-side h2 { font-size: 22px; text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin: 0; }
.options { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.field label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=number], .field select {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid color-mix(in srgb, var(--tool) 40%, transparent); border-color: var(--tool); }
.field input[type=color] { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fff; }
.field input[type=range] { width: 100%; accent-color: var(--tool); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--tool); width: 16px; height: 16px; }
.radio-cards { display: flex; flex-direction: column; gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--tool); background: color-mix(in srgb, var(--tool) 6%, #fff); }
.radio-card input { accent-color: var(--tool); margin-top: 4px; }
.radio-card strong { display: block; font-size: 14px; }
.radio-card small { color: var(--muted); font-size: 12px; }
.tip { margin: 0; padding: 12px 14px; background: var(--bg); border-radius: 10px; font-size: 13px; color: var(--muted); }
.side-msg { padding: 12px 14px; border-radius: 10px; background: #fdecec; color: #b42318; font-size: 14px; }

.btn-primary {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	background: var(--tool, var(--brand)); color: #fff; border: 0; border-radius: 12px;
	padding: 16px 28px; font-size: 18px; font-weight: 700; cursor: pointer; transition: .15s;
}
.btn-primary:hover { filter: brightness(1.06); text-decoration: none; }
.btn-go { width: 100%; }
.btn-download { font-size: 22px; padding: 20px 44px; margin: 8px 0 12px; }
.btn-download svg { transform: rotate(180deg); }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* busy & done */
.spinner {
	width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%;
	border: 5px solid var(--line); border-top-color: var(--tool, var(--brand));
	animation: spin .8s linear infinite;
}
.spinner.sm { width: 26px; height: 26px; border-width: 3px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { max-width: 420px; height: 8px; margin: 12px auto 0; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--tool); transition: width .2s; }

.more-tools { max-width: 900px; margin: 48px auto 0; padding-top: 32px; border-top: 1px solid var(--line); }
.more-tools h3 { font-size: 16px; color: var(--muted); }
.mini-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; text-align: left; }

/* ---------- content ---------- */

.entry { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.entry.container { margin: 40px auto; padding: 40px clamp(20px, 5vw, 56px); }
.tool-content, .home-content { max-width: 900px; margin: 0 auto 64px; padding: 40px clamp(20px, 5vw, 56px); }
.entry-header h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; }
.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { border-radius: var(--radius); }
.entry-content > * { max-width: 100%; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content img { border-radius: 8px; }
.post-meta { font-size: 13px; color: var(--muted); }

.page-header h1 { font-size: 36px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-body { padding: 20px; }
.post-body h2 { font-size: 20px; }
.post-body h2 a { color: var(--ink); }
.nav-links { display: flex; gap: 8px; margin-top: 32px; }
.nav-links .page-numbers { padding: 8px 14px; background: #fff; border-radius: 8px; }
.nav-links .current { background: var(--brand); color: #fff; }

/* ---------- footer ---------- */

.site-footer { background: #17181c; color: #b4b7c0; font-size: 14px; }
.footer-inner {
	max-width: var(--max); margin: 0 auto; padding: 56px 20px 40px;
	display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 32px;
}
.site-footer .text-logo { color: #fff; }
.footer-about p { margin-top: 14px; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul, .footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 6px 0; }
.site-footer a { color: #b4b7c0; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
	max-width: var(--max); margin: 0 auto; padding: 20px; border-top: 1px solid #2a2c33;
	display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
}
.footer-menu { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
	.site-nav .mega-panel { grid-template-columns: repeat(3, minmax(170px, 1fr)); left: -200px; }
	.footer-inner { grid-template-columns: repeat(3, 1fr); }
	.footer-about { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav {
		display: none; position: absolute; top: 64px; left: 0; right: 0;
		background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
		max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: var(--shadow-hover);
	}
	.nav-open .site-nav { display: block; }
	.site-nav .menu { flex-direction: column; align-items: stretch; }
	.site-nav .menu > li > a { padding: 12px 0; }
	.site-nav .sub-menu, .site-nav .mega-panel {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; padding: 0 0 8px; display: block;
	}
	.mega-col { margin-bottom: 12px; }

	.stage-work { grid-template-columns: 1fr; margin: 0; }
	.work-main { padding: 16px 0; }
	.work-side {
		position: sticky; bottom: 0; top: auto; height: auto; max-height: none;
		border-left: 0; border-top: 1px solid var(--line); margin: 0 -20px; padding: 20px;
		box-shadow: 0 -8px 24px rgba(0, 0, 0, .06);
	}
	.admin-bar .work-side { top: auto; height: auto; }
	.work-side h2 { display: none; }
	.cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
	.cards-pages { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
	.card .thumb { height: 150px; }
	.cards-pages .card .thumb { height: 120px; }
	.tb-info { margin-left: 0; width: 100%; }
}

@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
	.btn-upload { font-size: 18px; padding: 18px 32px; }
	.footer-inner { grid-template-columns: 1fr 1fr; }
	.tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.tool-card { padding: 16px; }
	.tool-card h3 { font-size: 16px; }
	.tool-card p { display: none; }
	.hero { padding-top: 40px; }
}

/* ---------- header account links ---------- */

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.hdr-premium { font-weight: 700; font-size: 14px; color: #b7791f; padding: 8px 12px; border-radius: 8px; background: #fff7e6; }
.hdr-premium:hover { text-decoration: none; background: #ffefcc; }
.hdr-login { font-weight: 600; font-size: 14px; color: var(--ink); padding: 8px 10px; }
.hdr-signup { padding: 9px 18px; font-size: 14px; border-radius: 9px; }
.hdr-account { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 14px; }
.hdr-account:hover { text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pro-badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: linear-gradient(135deg, #f5a524, #e5484d); color: #fff; vertical-align: middle; }
.site-nav { min-width: 0; }

/* ---------- auth pages ---------- */

.plain-page { min-height: 60vh; }
.auth-wrap { display: grid; place-items: center; padding: 56px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-hover); padding: 36px 32px; }
.auth-logo { margin-bottom: 18px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label, .account form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.auth-form label small, .account form label small { font-weight: 400; color: var(--muted); font-size: 12px; }
.auth-form input[type=text], .auth-form input[type=email], .auth-form input[type=password],
.account form input[type=text], .account form input[type=password] {
	padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 400; background: #fff;
}
.auth-form input:focus, .account form input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.auth-form .check { flex-direction: row; font-weight: 400; align-items: flex-start; }
.auth-form .check input { margin-top: 4px; accent-color: var(--brand); }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.auth-row .check { flex-direction: row; font-weight: 400; }
.auth-alt { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-block { width: 100%; }
.form-msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 0 0 14px; background: var(--bg); }
.form-msg.is-error { background: #fdecec; color: #b42318; }
.form-msg.is-success { background: #e9f8ef; color: #18794e; }

/* ---------- account ---------- */

.account { max-width: var(--max); margin: 0 auto; padding: 40px 20px 64px; }
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.account-head h1 { font-size: 30px; margin: 0; }
.account-head p { margin: 0; color: var(--muted); }
.account-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; align-items: start; }
.panel { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 24px; }
.panel h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; }
.panel form { display: flex; flex-direction: column; gap: 12px; }
.plan-panel.is-premium { border-top: 4px solid #f5a524; }
.plan-name { font-size: 26px; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); margin: 0 0 8px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--bg); }
.pill-active { background: #e9f8ef; color: #18794e; }
.pill-cancelled, .pill-pending { background: #fff7e6; color: #b7791f; }
.pill-past_due, .pill-ended { background: #fdecec; color: #b42318; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.panel-actions .btn-primary { padding: 11px 20px; font-size: 15px; }
.btn-link.danger { color: #b42318; }
.usage { margin-bottom: 16px; }
.usage-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.usage .progress { margin: 0; max-width: none; }
.usage .progress span { background: var(--brand); }
.limits { list-style: none; margin: 0; padding: 0; }
.limits li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.limits li:last-child { border: 0; }

/* ---------- pricing ---------- */

.pricing { max-width: var(--max); margin: 0 auto; padding: 48px 20px 72px; }
.pricing-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.pricing-head h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.pricing-head p { color: var(--muted); font-size: 18px; }
.billing-toggle { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-top: 12px; }
.billing-toggle button { border: 0; background: none; padding: 10px 22px; border-radius: 999px; font-weight: 600; cursor: pointer; }
.billing-toggle button.is-active { background: var(--ink); color: #fff; }
.save { font-size: 12px; font-weight: 700; background: #e9f8ef; color: #18794e; padding: 2px 8px; border-radius: 99px; margin-left: 4px; }
.billing-toggle .is-active .save { background: #30a46c; color: #fff; }
.pricing[data-interval="monthly"] [data-show="yearly"], .pricing[data-interval="yearly"] [data-show="monthly"] { display: none; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: stretch; }
.plan-card { position: relative; background: #fff; border-radius: 16px; padding: 28px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 2px solid transparent; }
.plan-card.is-popular { border-color: var(--brand); box-shadow: var(--shadow-hover); }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 99px; white-space: nowrap; }
.plan-card h3 { font-size: 20px; margin-bottom: 10px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price .amount { font-size: 42px; font-weight: 800; letter-spacing: -.03em; }
.plan-price .per { color: var(--muted); }
.billed { color: var(--muted); font-size: 13px; margin: 2px 0 16px; min-height: 20px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan-features li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: #30a46c; font-weight: 800; }
.plan-card .btn-primary, .plan-card .btn-ghost { padding: 13px 16px; font-size: 16px; border-radius: 10px; }

.free-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border-radius: 14px; padding: 18px 24px; margin-top: 20px; box-shadow: var(--shadow); }
.free-row span { color: var(--muted); font-size: 14px; margin-left: 10px; }
.pay-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 0; align-items: center; }
.pay-logos span { font-weight: 800; font-size: 13px; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 10px; }
.pay-logos small { width: 100%; text-align: center; color: var(--muted); display: inline-flex; justify-content: center; gap: 6px; align-items: center; }
.pay-logos small svg { width: 14px; height: 14px; }
.faq { max-width: 760px; margin: 56px auto 0; }
.faq h2 { text-align: center; }
.faq details { background: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.pay-modal { position: fixed; inset: 0; background: rgba(16, 18, 24, .55); z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal-open { overflow: hidden; }
.pay-box { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 18px; padding: 30px 28px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.pay-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--muted); }
.pay-box h2 { font-size: 22px; margin: 0 0 4px; }
.pay-price { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.interval-switch { display: flex; gap: 16px; margin-bottom: 16px; font-size: 14px; }
.interval-switch input { accent-color: var(--brand); }
.btn-card { gap: 8px; font-size: 16px; padding: 15px; }
.btn-card svg { width: 18px; height: 18px; }
.pay-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.pay-or::before, .pay-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.paypal-box { min-height: 45px; }
.pay-small { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 0; }

/* ---------- upgrade prompts, ads ---------- */

.upsell {
	position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 150;
	width: min(640px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px;
	background: #1c1d22; color: #fff; padding: 14px 16px 14px 18px; border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
.upsell [data-upsell-text] { flex: 1; font-size: 14px; }
.upsell-star { color: #f5a524; font-size: 20px; }
.upsell .btn-primary { padding: 9px 16px; font-size: 14px; background: linear-gradient(135deg, #f5a524, #e5484d); white-space: nowrap; }
.upsell-close { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; opacity: .7; }
.limits-note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.limits-note.is-pro { color: #b7791f; }
.done-upsell { max-width: 640px; margin: 24px auto 0; padding: 16px 20px; border-radius: 12px; background: #fff7e6; color: #7a4d0b; font-size: 15px; }
.locked-tool .tool-icon.lg { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 16px; }
.locked-tool .tool-icon.lg svg { width: 36px; height: 36px; }
.btn-upload-like { font-size: 20px; padding: 18px 40px; border-radius: 14px; background: linear-gradient(135deg, #f5a524, #e5484d); }
.radio-card .pro-badge, .check .pro-badge { margin-left: 6px; }
.ad-slot { max-width: 970px; margin: 28px auto; text-align: center; overflow: hidden; }
.ad-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 1000px) {
	.account-grid { grid-template-columns: 1fr 1fr; }
	.plan-panel { grid-column: 1 / -1; }
	.hdr-name { display: none; }
}
@media (max-width: 860px) {
	.header-actions { margin-left: auto; margin-right: 4px; }
	.nav-toggle { margin-left: 0; order: 3; }
	.hdr-premium { display: none; }
}
@media (max-width: 600px) {
	.account-grid { grid-template-columns: 1fr; }
	.account-head { flex-direction: column; align-items: flex-start; }
	.auth-card { padding: 28px 20px; }
	.hdr-login { display: none; }
	.free-row span { display: block; margin: 4px 0 0; }
}

/* ---------- contact ---------- */

.contact-wrap { max-width: 1040px; margin: 0 auto; padding: 56px 20px 72px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-info h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 800; letter-spacing: -.03em; }
.contact-info > p { color: var(--muted); font-size: 17px; }
.contact-points { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-points li { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.contact-points strong { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-hover); padding: 28px; }
.contact-card form { display: flex; flex-direction: column; gap: 14px; }
.contact-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.contact-card input[type=text], .contact-card input[type=email], .contact-card select, .contact-card textarea {
	padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 400; background: #fff; width: 100%;
}
.contact-card textarea { resize: vertical; min-height: 140px; }
.contact-card input:focus, .contact-card select:focus, .contact-card textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.form-note { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
.contact-sent { text-align: center; padding: 24px 0; }
.contact-sent > span { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e9f8ef; color: #18794e; font-size: 28px; font-weight: 800; margin-bottom: 12px; }

/* ---------- legal pages ---------- */

.entry-content h2.wp-block-heading { font-size: 22px; margin-top: 1.8em; }
.entry-content h3.wp-block-heading { font-size: 17px; margin-top: 1.4em; }
.entry-content ul { padding-left: 22px; }
.entry-content li { margin: 6px 0; }
.entry-content code { background: var(--bg); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* ---------- cookie notice ---------- */

.cookie-notice {
	position: fixed; left: 16px; bottom: 16px; z-index: 140; max-width: 420px;
	display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .18); padding: 14px 16px; font-size: 14px;
}
.cookie-notice p { margin: 0; }
.cookie-notice .btn-primary { padding: 9px 18px; font-size: 14px; flex-shrink: 0; }

@media (max-width: 760px) {
	.contact-wrap { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
	.contact-card { padding: 22px 18px; }
	.cookie-notice { left: 12px; right: 12px; max-width: none; }
}

/* ---------- logo ---------- */
.logo-text { letter-spacing: -.03em; }
.logo-accent { color: var(--brand); }
.site-footer .logo-accent { color: #a5a0ff; }
.logo-mark svg { fill: none; stroke: currentColor; stroke-width: 2.2; }
