/* ==========================================================
   Humanizer, OakWrites theme
   Edit the variables below to fine tune colours to your site.
   ========================================================== */
.hz {
	--hz-green: #1f5f3f;
	--hz-green-dark: #174a31;
	--hz-green-soft: #e8f2ec;
	--hz-ink: #1a1d1b;
	--hz-text: #3b413d;
	--hz-muted: #6b736e;
	--hz-bg: #f6f7f5;
	--hz-card: #ffffff;
	--hz-border: #e3e7e3;
	--hz-gold: #d4a53a;
	--hz-gold-soft: #fbf3df;
	--hz-error: #b42318;
	--hz-radius: 16px;
	--hz-shadow: 0 1px 2px rgba(16, 24, 20, .04), 0 8px 24px rgba(16, 24, 20, .06);
	--hz-font-head: "Manrope", "Poppins", "Inter", system-ui, sans-serif;
	--hz-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(20px, 4vw, 40px);
	background: var(--hz-bg);
	border-radius: calc(var(--hz-radius) + 4px);
	font-family: var(--hz-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--hz-text);
	box-sizing: border-box;
}
.hz *, .hz *::before, .hz *::after { box-sizing: border-box; }
.hz [hidden] { display: none !important; }
.hz svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.hz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.hz-head { text-align: center; max-width: 680px; margin: 0 auto clamp(20px, 3vw, 32px); }
.hz-eyebrow {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 12px; border-radius: 999px;
	background: var(--hz-green-soft); color: var(--hz-green);
	font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.hz-eyebrow svg { width: 14px; height: 14px; fill: var(--hz-gold); stroke: var(--hz-gold); }
.hz .hz-title {
	margin: 14px 0 8px; padding: 0;
	font-family: var(--hz-font-head); font-weight: 800;
	font-size: clamp(26px, 4.2vw, 40px); line-height: 1.15; letter-spacing: -.02em;
	color: var(--hz-ink);
}
.hz-sub { margin: 0; color: var(--hz-muted); font-size: clamp(15px, 1.8vw, 17px); }
.hz-usage {
	display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
	padding: 6px 14px; border-radius: 999px;
	background: var(--hz-gold-soft); color: #7a5a12;
	border: 1px solid #f0dfb4; font-size: 14px; font-weight: 600;
}
.hz-usage b { font-family: var(--hz-font-head); font-size: 16px; color: var(--hz-ink); }

/* ---------- Layout ---------- */
.hz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 24px); }

.hz-card {
	display: flex; flex-direction: column; min-width: 0;
	background: var(--hz-card);
	border: 1px solid var(--hz-border);
	border-radius: var(--hz-radius);
	box-shadow: var(--hz-shadow);
	overflow: hidden;
}
.hz-card-head, .hz-card-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 18px;
}
.hz-card-head { border-bottom: 1px solid var(--hz-border); }
.hz-card-foot { border-top: 1px solid var(--hz-border); flex-wrap: wrap; }
.hz .hz-card-title {
	margin: 0; padding: 0;
	font-family: var(--hz-font-head); font-weight: 700; font-size: 16px; color: var(--hz-ink);
}
.hz-card-out .hz-card-title::before {
	content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
	border-radius: 50%; background: var(--hz-green); vertical-align: middle;
}
.hz-card-body { flex: 1; position: relative; min-height: 340px; }

/* ---------- Input ---------- */
.hz .hz-input {
	display: block; width: 100%; height: 100%; min-height: 340px; margin: 0;
	padding: 18px; border: 0; border-radius: 0; box-shadow: none;
	background: transparent; resize: vertical;
	font: inherit; color: var(--hz-ink);
}
.hz .hz-input:focus { outline: none; background: #fcfdfc; }
.hz-card:focus-within { border-color: #b9d3c3; }

/* ---------- Output ---------- */
.hz-output { padding: 18px; color: var(--hz-ink); max-height: 560px; overflow-y: auto; }
.hz-output p { margin: 0 0 1em; }
.hz-output p:last-child { margin-bottom: 0; }
.hz-output .hz-heading { font-family: var(--hz-font-head); font-weight: 700; }
.hz-sent { cursor: pointer; border-radius: 4px; transition: background-color .15s; }
.hz-sent:hover, .hz-sent:focus-visible { background: var(--hz-green-soft); outline: none; }
.hz-sent.hz-changed { background: var(--hz-gold-soft); box-shadow: inset 0 -2px 0 var(--hz-gold); }
.hz-sent.hz-loading { opacity: .45; cursor: progress; animation: hz-pulse 1.1s ease-in-out infinite; }

.hz-empty {
	position: absolute; inset: 0; display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 10px;
	padding: 24px; text-align: center; color: var(--hz-muted);
}
.hz-empty svg { width: 36px; height: 36px; color: #b9c4bd; }
.hz-empty p { margin: 0; font-size: 15px; }

.hz-skeleton { padding: 22px 18px; }
.hz-skeleton span {
	display: block; height: 12px; margin-bottom: 14px; border-radius: 6px;
	background: linear-gradient(90deg, #eef1ee 25%, #e2e8e3 50%, #eef1ee 75%);
	background-size: 200% 100%; animation: hz-shimmer 1.3s linear infinite;
}
.hz-skeleton span:nth-child(2) { width: 92%; }
.hz-skeleton span:nth-child(3) { width: 97%; }
.hz-skeleton span:nth-child(4) { width: 85%; }
.hz-skeleton span:nth-child(5) { width: 60%; }

.hz-count { font-size: 13px; color: var(--hz-muted); font-variant-numeric: tabular-nums; }
.hz-count.hz-over { color: var(--hz-error); font-weight: 600; }
.hz-hint { font-size: 13px; color: var(--hz-muted); }

/* ---------- Buttons ---------- */
.hz .hz-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 22px; margin: 0;
	border: 1px solid var(--hz-green); border-radius: 10px;
	background: var(--hz-green); color: #fff;
	font-family: var(--hz-font-body); font-size: 15px; font-weight: 600; line-height: 1;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s, border-color .15s, transform .05s;
}
.hz .hz-btn:hover { background: var(--hz-green-dark); border-color: var(--hz-green-dark); color: #fff; }
.hz .hz-btn:active { transform: translateY(1px); }
.hz .hz-btn:focus-visible { outline: 3px solid rgba(212, 165, 58, .55); outline-offset: 2px; }
.hz .hz-btn:disabled { opacity: .55; cursor: not-allowed; }
.hz .hz-btn-ghost { min-height: 36px; padding: 6px 14px; background: #fff; color: var(--hz-ink); border-color: var(--hz-border); }
.hz .hz-btn-ghost:hover { background: var(--hz-bg); color: var(--hz-ink); border-color: #cfd6d1; }
.hz .hz-btn-outline { background: #fff; color: var(--hz-green); }
.hz .hz-btn-outline:hover { background: var(--hz-green-soft); color: var(--hz-green-dark); }
.hz .hz-link {
	background: none; border: 0; padding: 4px 2px; margin: 0; cursor: pointer;
	color: var(--hz-muted); font: inherit; font-size: 14px; font-weight: 500;
}
.hz .hz-link:hover { color: var(--hz-green); text-decoration: underline; }

.hz-spinner {
	display: none; width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
	animation: hz-spin .7s linear infinite;
}
.hz-busy .hz-spinner { display: inline-block; }

/* ---------- Status ---------- */
.hz-status { min-height: 22px; margin-top: 14px; text-align: center; font-size: 14px; color: var(--hz-muted); }
.hz-status.hz-error { color: var(--hz-error); font-weight: 500; }

/* ---------- Login gate ---------- */
.hz-gate {
	position: absolute; inset: 0; z-index: 5;
	display: flex; align-items: center; justify-content: center; padding: 20px;
	background: rgba(246, 247, 245, .78);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	border-radius: inherit;
}
.hz-gate[hidden] { display: none; }
.hz-gate-card {
	width: 100%; max-width: 420px; padding: 32px 28px 22px; text-align: center;
	background: #fff; border: 1px solid var(--hz-border); border-radius: var(--hz-radius);
	box-shadow: 0 20px 50px rgba(16, 24, 20, .14);
}
.hz-gate-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; border-radius: 50%;
	background: var(--hz-gold-soft); color: #9a7114;
}
.hz-gate-icon svg { width: 26px; height: 26px; }
.hz .hz-gate-title { margin: 16px 0 6px; font-family: var(--hz-font-head); font-weight: 800; font-size: 22px; line-height: 1.25; color: var(--hz-ink); }
.hz-gate-text { margin: 0 0 22px; color: var(--hz-muted); }
.hz-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hz-gate-actions .hz-btn { flex: 1 1 150px; }
.hz-gate-close { margin-top: 14px; }

/* ---------- Animation ---------- */
@keyframes hz-spin { to { transform: rotate(360deg); } }
@keyframes hz-shimmer { to { background-position: -200% 0; } }
@keyframes hz-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
	.hz *, .hz *::before, .hz *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hz-grid { grid-template-columns: 1fr; }
	.hz-card-body, .hz .hz-input { min-height: 240px; }
	.hz-output { max-height: none; }
}
@media (max-width: 560px) {
	.hz { padding: 18px 14px; border-radius: 14px; }
	.hz-card-head, .hz-card-foot { padding: 12px 14px; }
	.hz .hz-input, .hz-output { padding: 14px; font-size: 16px; }
	.hz-card:first-child .hz-card-foot { flex-direction: column-reverse; align-items: stretch; }
	.hz-card:first-child .hz-card-foot .hz-btn { width: 100%; }
	.hz-card:first-child .hz-count { text-align: center; }
	.hz-gate-card { padding: 26px 18px 18px; }
	.hz-gate-actions { flex-direction: column; }
	.hz-gate-actions .hz-btn { flex: none; width: 100%; }
}
