/* AI Text Humanizer & Content Checker */
.ath-tool, .ath-tabs {
	--ath-accent: #01696F;
	--ath-text: #1f2328;
	--ath-muted: #5f6670;
	--ath-border: #dfe2e6;
	--ath-surface: #ffffff;
	--ath-soft: #f6f7f8;
	--ath-human: #2e8b57;
	--ath-mixed: #d08b16;
	--ath-ai: #c8423b;
	--ath-radius: 12px;
	font-family: inherit;
	color: var(--ath-text);
	box-sizing: border-box;
}
.ath-tool *, .ath-tabs * { box-sizing: border-box; }
.ath-tool {
	background: var(--ath-surface);
	border: 1px solid var(--ath-border);
	border-radius: var(--ath-radius);
	padding: clamp(16px, 3vw, 28px);
	margin: 0 0 24px;
}
.ath-tabs .ath-tool { border-top-left-radius: 0; border-top-right-radius: 0; margin: 0; }
.ath-title { margin: 0 0 6px; font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); line-height: 1.2; color: var(--ath-text); }
.ath-subtitle { margin: 0 0 18px; color: var(--ath-muted); font-size: 0.95rem; }

/* Tabs */
.ath-tablist { display: flex; gap: 4px; }
.ath-tab {
	appearance: none; border: 1px solid var(--ath-border); border-bottom: none;
	background: var(--ath-soft); color: var(--ath-muted);
	padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer;
	border-radius: var(--ath-radius) var(--ath-radius) 0 0;
}
.ath-tab.is-active { background: var(--ath-surface); color: var(--ath-accent); box-shadow: inset 0 3px 0 var(--ath-accent); }

/* Options */
.ath-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ath-options label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ath-muted); }
.ath-options select {
	font: inherit; font-weight: 400; color: var(--ath-text); padding: 9px 10px;
	border: 1px solid var(--ath-border); border-radius: 8px; background: var(--ath-surface); width: 100%;
}

/* Panes */
.ath-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .ath-panes { grid-template-columns: 1fr; } }
.ath-pane { border: 1px solid var(--ath-border); border-radius: 10px; overflow: hidden; background: var(--ath-surface); display: flex; flex-direction: column; }
.ath-pane-head, .ath-pane-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--ath-soft); font-size: 0.85rem; }
.ath-pane-foot { justify-content: flex-start; flex-wrap: wrap; border-top: 1px solid var(--ath-border); }
.ath-pane-head { border-bottom: 1px solid var(--ath-border); }
.ath-count, .ath-out-count { color: var(--ath-muted); font-variant-numeric: tabular-nums; }
.ath-count.is-over { color: var(--ath-ai); font-weight: 600; }
.ath-tool textarea {
	width: 100%; min-height: 260px; resize: vertical; border: 0; outline: none; margin: 0;
	padding: 14px; font: inherit; font-size: 0.95rem; line-height: 1.6; color: var(--ath-text); background: var(--ath-surface);
	flex: 1;
}
.ath-tool textarea:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ath-accent) 35%, transparent); }
.ath-output { background: color-mix(in srgb, var(--ath-accent) 3%, #fff) !important; }

/* Buttons */
.ath-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.ath-btn {
	appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 1rem;
	background: var(--ath-accent); color: #fff; padding: 12px 26px; border-radius: 999px;
	transition: filter .15s ease, transform .15s ease;
}
.ath-btn:hover { filter: brightness(1.08); }
.ath-btn:active { transform: translateY(1px); }
.ath-btn:disabled { opacity: .6; cursor: progress; }
.ath-btn-ghost {
	appearance: none; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 600;
	background: transparent; color: var(--ath-accent); border: 1px solid var(--ath-border);
	padding: 5px 12px; border-radius: 999px;
}
.ath-btn-ghost:hover:not(:disabled) { border-color: var(--ath-accent); }
.ath-btn-ghost:disabled { color: var(--ath-muted); opacity: .5; cursor: not-allowed; }
.ath-status { font-size: 0.9rem; color: var(--ath-muted); display: inline-flex; align-items: center; gap: 8px; }
.ath-status.is-error { color: var(--ath-ai); font-weight: 600; }
.ath-spinner { width: 16px; height: 16px; border: 2px solid var(--ath-border); border-top-color: var(--ath-accent); border-radius: 50%; animation: ath-spin .8s linear infinite; display: inline-block; }
@keyframes ath-spin { to { transform: rotate(360deg); } }

/* Score bars */
.ath-scorebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; padding: 14px; background: var(--ath-soft); border-radius: 10px; }
@media (max-width: 600px) { .ath-scorebar { grid-template-columns: 1fr; } }
.ath-sb-item > span { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ath-muted); margin-bottom: 6px; }
.ath-split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--ath-border); }
.ath-split-h { background: var(--ath-human); transition: width .6s ease; }
.ath-split-a { background: var(--ath-ai); transition: width .6s ease; }
.ath-split-legend { display: flex; justify-content: space-between; font-size: 0.82rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ath-split-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.ath-dot-h { background: var(--ath-human); }
.ath-dot-a { background: var(--ath-ai); }

/* Checker result */
.ath-result { margin-top: 22px; }
.ath-summary { display: flex; gap: 24px; align-items: center; padding: 18px; border: 1px solid var(--ath-border); border-radius: 12px; }
@media (max-width: 560px) { .ath-summary { flex-direction: column; text-align: center; } }
.ath-summary-text { flex: 1; width: 100%; }
.ath-verdict { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.ath-meta { color: var(--ath-muted); font-size: 0.82rem; margin-top: 8px; }
.ath-gauge { position: relative; flex-shrink: 0; }
.ath-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ath-g-bg { fill: none; stroke: color-mix(in srgb, var(--ath-ai) 22%, #fff); stroke-width: 12; }
.ath-g-fg { fill: none; stroke: var(--ath-human); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ath-gauge.is-mixed .ath-g-fg { stroke: var(--ath-mixed); }
.ath-gauge.is-ai .ath-g-fg { stroke: var(--ath-ai); }
.ath-g-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ath-g-label b { font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ath-g-label span { font-size: 0.78rem; color: var(--ath-muted); margin-top: 4px; }

.ath-block { margin-top: 20px; }
.ath-block h4 { margin: 0 0 10px; font-size: 1rem; }
.ath-signals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ath-signal { border: 1px solid var(--ath-border); border-radius: 10px; padding: 10px 12px; }
.ath-signal-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; font-weight: 600; }
.ath-signal small { display: block; color: var(--ath-muted); font-size: 0.78rem; margin-top: 6px; line-height: 1.4; }
.ath-meter { height: 6px; background: var(--ath-soft); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.ath-meter i { display: block; height: 100%; background: var(--ath-human); border-radius: 999px; }
.ath-signal.is-mixed .ath-meter i { background: var(--ath-mixed); }
.ath-signal.is-ai .ath-meter i { background: var(--ath-ai); }
.ath-highlight { line-height: 1.8; padding: 14px; background: var(--ath-soft); border-radius: 10px; font-size: 0.95rem; max-height: 420px; overflow: auto; }
.ath-highlight mark, .ath-legend mark { padding: 1px 2px; border-radius: 3px; color: inherit; cursor: help; }
.ath-hl-high { background: color-mix(in srgb, var(--ath-ai) 22%, #fff); }
.ath-hl-medium { background: color-mix(in srgb, var(--ath-mixed) 22%, #fff); }
.ath-legend { font-size: 0.8rem; color: var(--ath-muted); display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.ath-reasons { margin: 0; padding-left: 18px; }
.ath-notice { font-size: 0.85rem; color: var(--ath-mixed); }
.ath-disclaimer { margin: 16px 0 0; font-size: 0.78rem; color: var(--ath-muted); line-height: 1.5; }
.ath-login { text-align: center; }
.ath-tool.is-busy .ath-input { opacity: .7; }
