/* 谷哥大叔 TextGears 文案智能校对：建立在可读性工具品牌基础样式之上 */
body.ssa-textgears-page {
	--ssa-tg-red: #c74b52;
	--ssa-tg-orange: #d98745;
	--ssa-tg-purple: #7656a7;
	--ssa-tg-green: #3f9660;
}

.ssa-tg,
.ssa-tg * {
	box-sizing: border-box;
}

.ssa-tg [hidden] {
	display: none !important;
}

.ssa-tg button,
.ssa-tg select,
.ssa-tg textarea {
	font: inherit;
	text-transform: none;
}

.ssa-tg-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 11px;
}

.ssa-tg-toolbar label {
	margin: 0;
	color: var(--rdb-ink, #263f52);
	font-size: 13px;
	font-weight: 850;
}

.ssa-tg-toolbar select {
	width: auto;
	min-width: 210px;
	height: 42px;
	margin: 0;
	padding: 0 38px 0 13px;
	border: 1px solid #c9dce5;
	border-radius: 10px;
	background-color: #fff;
	color: #385365;
	box-shadow: none;
}

.ssa-tg-toolbar button,
.ssa-tg-section-head > button {
	margin: 0 0 0 auto;
	padding: 9px 13px;
	border: 1px solid #bed8e4;
	border-radius: 9px;
	background: #eef8fb;
	color: #2d7897;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	box-shadow: none;
}

.ssa-tg-toolbar button:hover,
.ssa-tg-section-head > button:hover {
	border-color: #73b6cf;
	background: #e2f3f9;
	color: #235f79;
}

.ssa-tg-results {
	margin-top: 24px;
}

.ssa-tg-overview {
	display: grid;
	grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
	gap: 20px;
	padding: 26px;
	border-bottom: 1px solid var(--rdb-line, #d4e4eb);
	background: #fbfdfe;
}

.ssa-tg-score {
	display: flex;
	align-items: center;
	gap: 21px;
	padding: 20px;
	border: 1px solid #d4e5ec;
	border-radius: 17px;
	background: #fff;
}

.ssa-tg-ring {
	--ssa-tg-score: 0deg;
	display: grid;
	flex: 0 0 116px;
	width: 116px;
	height: 116px;
	place-items: center;
	border-radius: 50%;
	background: conic-gradient(#3d92b5 var(--ssa-tg-score), #e6f0f4 0);
	position: relative;
}

.ssa-tg-ring::after {
	content: "";
	position: absolute;
	inset: 10px;
	border-radius: inherit;
	background: #fff;
}

.ssa-tg-ring span {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
}

.ssa-tg-ring strong {
	color: #29475a;
	font-size: 29px;
	font-weight: 900;
	line-height: 1;
}

.ssa-tg-ring small,
.ssa-tg-score > div > small {
	margin-top: 5px;
	color: #81949f;
	font-size: 10px;
	font-weight: 750;
}

.ssa-tg-score h3 {
	margin: 4px 0 7px;
	color: #29475a;
	font-size: 23px;
	font-weight: 850;
}

.ssa-tg-score p {
	margin: 0;
	color: #6e838f;
	font-size: 13px;
	line-height: 1.65;
}

.ssa-tg-error-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.ssa-tg-error-stats > div {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 76px;
	padding: 13px 15px;
	border: 1px solid #d6e5eb;
	border-radius: 14px;
	background: #fff;
}

.ssa-tg-error-stats span {
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	border-radius: 11px;
	background: #e8f4f8;
	color: #2f7d9b;
	font-size: 13px;
	font-weight: 900;
}

.ssa-tg-error-stats .is-grammar span { background: #fcebed; color: var(--ssa-tg-red); }
.ssa-tg-error-stats .is-spelling span { background: #fff2e5; color: var(--ssa-tg-orange); }
.ssa-tg-error-stats .is-style span { background: #f0eafb; color: var(--ssa-tg-purple); }

.ssa-tg-error-stats p {
	display: grid;
	gap: 2px;
	margin: 0;
}

.ssa-tg-error-stats small {
	color: #7b8e99;
	font-size: 10px;
}

.ssa-tg-error-stats strong {
	color: #29475a;
	font-size: 22px;
	font-weight: 900;
	line-height: 1;
}

.ssa-tg-section {
	margin: 20px 26px;
	padding: 22px;
	border: 1px solid #d5e5ec;
	border-radius: 17px;
	background: #fff;
}

.ssa-tg-section-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 17px;
}

.ssa-tg-section-head span {
	display: block;
	margin-bottom: 4px;
	color: #3785a3;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.ssa-tg-section-head h3 {
	margin: 0;
	color: #29475a;
	font-size: 19px;
	font-weight: 850;
}

.ssa-tg-section-head p {
	margin: 4px 0 0;
	color: #7b8e99;
	font-size: 12px;
	line-height: 1.55;
}

.ssa-tg-corrected {
	border-color: #bcdccb;
	background: linear-gradient(145deg, #f8fcfa, #fff);
}

.ssa-tg-corrected-text {
	min-height: 105px;
	padding: 17px 18px;
	border: 1px solid #cfe5d8;
	border-radius: 12px;
	background: #fff;
	color: #334f5d;
	font-size: 15px;
	line-height: 1.82;
	white-space: pre-wrap;
	word-break: break-word;
}

.ssa-tg-errors {
	display: grid;
	gap: 11px;
}

.ssa-tg-error {
	display: grid;
	grid-template-columns: 42px minmax(140px, .65fr) minmax(220px, 1.35fr);
	gap: 14px;
	align-items: start;
	padding: 15px;
	border: 1px solid #edd4d7;
	border-left: 4px solid var(--ssa-tg-red);
	border-radius: 12px;
	background: #fffafb;
}

.ssa-tg-error.is-spelling { border-color: #f1ddc8; border-left-color: var(--ssa-tg-orange); background: #fffaf5; }
.ssa-tg-error.is-punctuation,
.ssa-tg-error.is-style,
.ssa-tg-error.is-other { border-color: #ded4ed; border-left-color: var(--ssa-tg-purple); background: #fcfaff; }

.ssa-tg-error-index {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	border-radius: 10px;
	background: #fae7e9;
	color: #a83e46;
	font-size: 11px;
	font-weight: 900;
}

.ssa-tg-error.is-spelling .ssa-tg-error-index { background: #ffecd9; color: #b76729; }
.ssa-tg-error.is-punctuation .ssa-tg-error-index,
.ssa-tg-error.is-style .ssa-tg-error-index,
.ssa-tg-error.is-other .ssa-tg-error-index { background: #eee7f8; color: #674990; }

.ssa-tg-error-source small,
.ssa-tg-error-fix small {
	display: block;
	margin-bottom: 5px;
	color: #84949d;
	font-size: 10px;
}

.ssa-tg-error-source del {
	display: inline-block;
	padding: 4px 7px;
	border-radius: 6px;
	background: #fde4e6;
	color: #a63e45;
	font-size: 14px;
	font-weight: 800;
	text-decoration-thickness: 1px;
}

.ssa-tg-error-fix strong {
	display: inline-block;
	margin: 0 6px 5px 0;
	padding: 4px 8px;
	border-radius: 7px;
	background: #e8f5ec;
	color: #377b4d;
	font-size: 13px;
}

.ssa-tg-error-fix p {
	margin: 3px 0 0;
	color: #586f7c;
	font-size: 12px;
	line-height: 1.55;
}

.ssa-tg-error-meta {
	grid-column: 2 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding-top: 9px;
	border-top: 1px dashed #dfdfe3;
	color: #8798a2;
	font-size: 10px;
}

.ssa-tg-empty {
	padding: 22px;
	border: 1px solid #c9e2d2;
	border-radius: 12px;
	background: #f5fbf7;
	text-align: center;
}

.ssa-tg-empty strong { color: #377b4d; }
.ssa-tg-empty p { margin: 5px 0 0; color: #73877b; font-size: 12px; }

.ssa-tg-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.ssa-tg-metric {
	min-height: 102px;
	padding: 14px;
	border: 1px solid #dbe7ec;
	border-radius: 12px;
	background: #f9fcfd;
}

.ssa-tg-metric small {
	display: block;
	color: #7b8e99;
	font-size: 10px;
}

.ssa-tg-metric strong {
	display: block;
	margin: 7px 0 4px;
	color: #29475a;
	font-size: 19px;
	font-weight: 850;
	line-height: 1.15;
	word-break: break-word;
}

.ssa-tg-metric p {
	margin: 0;
	color: #8798a2;
	font-size: 10px;
	line-height: 1.45;
}

.ssa-tg-two-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}

.ssa-tg-two-columns .ssa-tg-section:first-child { margin-right: 10px; }
.ssa-tg-two-columns .ssa-tg-section:last-child { margin-left: 10px; }

.ssa-tg-probabilities {
	display: grid;
	gap: 10px;
}

.ssa-tg-probability > div,
.ssa-tg-emotion-row > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 5px;
	color: #526c7a;
	font-size: 12px;
}

.ssa-tg-probability i,
.ssa-tg-emotion-row i {
	display: block;
	height: 7px;
	overflow: hidden;
	border-radius: 99px;
	background: #e7f0f4;
}

.ssa-tg-probability i b,
.ssa-tg-emotion-row i b {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #347f9f, #75bdd8);
}

.ssa-tg-emotion {
	display: grid;
	gap: 15px;
}

.ssa-tg-emotion-row.is-positive i b { background: linear-gradient(90deg, #3f9660, #78bf8e); }
.ssa-tg-emotion-row.is-negative i b { background: linear-gradient(90deg, #c74b52, #e98a8f); }

.ssa-tg-keywords {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 18px;
}

.ssa-tg-keywords span {
	padding: 6px 10px;
	border: 1px solid #cbe0e9;
	border-radius: 99px;
	background: #eef7fa;
	color: #39758d;
	font-size: 11px;
	font-weight: 750;
}

.ssa-tg-insight-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.ssa-tg-insight-grid > div {
	padding: 15px;
	border: 1px solid #dce7ec;
	border-radius: 12px;
	background: #fafcfd;
}

.ssa-tg-insight-grid h4 {
	margin: 0 0 10px;
	color: #385568;
	font-size: 13px;
	font-weight: 850;
}

.ssa-tg-insight-grid p {
	position: relative;
	margin: 0 0 9px;
	padding-left: 16px;
	color: #5e7582;
	font-size: 12px;
	line-height: 1.6;
}

.ssa-tg-insight-grid p::before {
	content: "";
	position: absolute;
	top: .65em;
	left: 1px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #69abc4;
}

.ssa-tg-provider-notice {
	margin: 20px 26px;
	padding: 13px 15px;
	border: 1px solid #efd4a7;
	border-radius: 11px;
	background: #fff8eb;
	color: #855d24;
	font-size: 12px;
	line-height: 1.6;
}

@media (max-width: 900px) {
	.ssa-tg-overview,
	.ssa-tg-two-columns { grid-template-columns: 1fr; }
	.ssa-tg-two-columns .ssa-tg-section { margin: 10px 26px; }
	.ssa-tg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.ssa-tg-toolbar { align-items: stretch; flex-wrap: wrap; }
	.ssa-tg-toolbar label { width: 100%; }
	.ssa-tg-toolbar select { flex: 1; min-width: 0; }
	.ssa-tg-toolbar button { margin-left: 0; }
	.ssa-tg-overview { padding: 16px; }
	.ssa-tg-score { align-items: flex-start; gap: 14px; padding: 15px; }
	.ssa-tg-ring { flex-basis: 92px; width: 92px; height: 92px; }
	.ssa-tg-ring strong { font-size: 23px; }
	.ssa-tg-error-stats { grid-template-columns: 1fr 1fr; }
	.ssa-tg-error-stats > div { min-height: 68px; padding: 10px; }
	.ssa-tg-error-stats span { width: 32px; height: 32px; }
	.ssa-tg-section,
	.ssa-tg-two-columns .ssa-tg-section { margin: 14px 16px; padding: 16px; }
	.ssa-tg-section-head { display: block; }
	.ssa-tg-section-head > button { margin: 12px 0 0; }
	.ssa-tg-error { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
	.ssa-tg-error-fix { grid-column: 2; }
	.ssa-tg-error-meta { grid-column: 1 / -1; }
	.ssa-tg-metrics { grid-template-columns: 1fr 1fr; }
	.ssa-tg-metric { min-height: 94px; padding: 12px; }
	.ssa-tg-insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
	.ssa-tg-score { display: grid; grid-template-columns: 82px 1fr; }
	.ssa-tg-ring { width: 82px; height: 82px; }
	.ssa-tg-error-stats { grid-template-columns: 1fr; }
	.ssa-tg-error-stats > div { min-height: 58px; }
	.ssa-tg-metrics { grid-template-columns: 1fr; }
}
