/* GEO 检测工具：检测首页 + 报告页 */
:root {
	--geo-a: #198754;
	--geo-b: #0d6efd;
	--geo-c: #d39e00;
	--geo-d: #fd7e14;
	--geo-e: #dc3545;
	--geo-ink: #1f2937;
	--geo-muted: #6b7280;
	--geo-line: #e5e7eb;
	--geo-bg: #f6f8fb;
}

.geo-page {
	background: var(--geo-bg);
	color: var(--geo-ink);
}

.geo-page main {
	min-height: 60vh;
}

.geo-page a:not(.btn) {
	color: var(--geo-b);
}

.geo-page .btn-primary,
.geo-page .btn-primary:hover,
.geo-page .btn-primary:focus {
	color: #fff;
}

/* ---------- 通用卡片 / 标签 ---------- */
.geo-card {
	background: #fff;
	border: 1px solid var(--geo-line);
	border-radius: 12px;
	padding: 1.25rem;
	height: 100%;
}

.geo-section {
	padding: 2rem 0;
	border-bottom: 1px solid var(--geo-line);
	scroll-margin-top: 80px;
}

.geo-section:last-of-type {
	border-bottom: 0;
}

.geo-section-title {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 .35rem;
}

.geo-section-desc {
	color: var(--geo-muted);
	font-size: .925rem;
	margin-bottom: 1rem;
}

.geo-tag {
	display: inline-block;
	padding: .15rem .55rem;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
	border: 1px solid transparent;
}

.geo-tag.g-A { color: var(--geo-a); background: #e8f5ee; border-color: #bfe5cf; }
.geo-tag.g-B { color: var(--geo-b); background: #e8f0fe; border-color: #bcd3fc; }
.geo-tag.g-C { color: #8a6600; background: #fff6d6; border-color: #f3dc85; }
.geo-tag.g-D { color: #c2520a; background: #fff0e4; border-color: #fbcfae; }
.geo-tag.g-E { color: var(--geo-e); background: #fdecec; border-color: #f5b8b8; }
.geo-tag.g-nt { color: var(--geo-muted); background: #f1f3f5; border-color: #d9dde2; }

.geo-tag.p-P0 { color: #b02a37; background: #fdecec; }
.geo-tag.p-P1 { color: #8a6600; background: #fff6d6; }
.geo-tag.p-P2 { color: #186a3a; background: #e8f5ee; }

.geo-grade-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	color: #fff;
	font-weight: 800;
}

.geo-grade-letter.g-A { background: var(--geo-a); }
.geo-grade-letter.g-B { background: var(--geo-b); }
.geo-grade-letter.g-C { background: var(--geo-c); }
.geo-grade-letter.g-D { background: var(--geo-d); }
.geo-grade-letter.g-E { background: var(--geo-e); }
.geo-grade-letter.g-nt { background: var(--geo-muted); }

.text-g-A { color: var(--geo-a) !important; }
.text-g-B { color: var(--geo-b) !important; }
.text-g-C { color: #8a6600 !important; }
.text-g-D { color: #c2520a !important; }
.text-g-E { color: var(--geo-e) !important; }

/* ---------- 进度条 ---------- */
.geo-bar {
	height: 8px;
	border-radius: 999px;
	background: #e9edf2;
	overflow: hidden;
}

.geo-bar > span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--geo-b);
	transition: width .6s ease;
}

.geo-bar.b-A > span { background: var(--geo-a); }
.geo-bar.b-B > span { background: var(--geo-b); }
.geo-bar.b-C > span { background: var(--geo-c); }
.geo-bar.b-D > span { background: var(--geo-d); }
.geo-bar.b-E > span { background: var(--geo-e); }

/* ---------- 检测首页 ---------- */
.geo-hero {
	padding: 3.5rem 0 2.5rem;
	background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 60%, #eefaf3 100%);
	border-bottom: 1px solid var(--geo-line);
}

.geo-hero h1 {
	font-size: clamp(1.6rem, 3.2vw, 2.4rem);
	font-weight: 800;
	margin-bottom: .6rem;
}

.geo-hero p.lead {
	color: var(--geo-muted);
	font-size: 1.05rem;
	margin-bottom: 1.5rem;
}

.geo-form {
	max-width: 720px;
	margin: 0 auto;
}

.geo-form .input-group {
	box-shadow: 0 6px 20px rgba(13, 110, 253, .08);
	border-radius: 10px;
}

.geo-form .form-control,
.geo-form .btn {
	height: 54px;
}

.geo-form .form-control {
	border-color: #cfd8e3;
	font-size: 1.05rem;
}

.geo-form .btn {
	min-width: 128px;
	font-weight: 700;
}

.geo-status {
	min-height: 1.6rem;
	font-size: .9rem;
	color: var(--geo-muted);
	margin-top: .75rem;
}

.geo-status.is-error { color: var(--geo-e); }

.geo-dim-card h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 .35rem;
}

.geo-dim-card p {
	font-size: .9rem;
	color: var(--geo-muted);
	margin: 0;
}

.geo-dim-card .geo-weight {
	font-size: .78rem;
	color: var(--geo-muted);
}

.geo-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.geo-list li {
	display: flex;
	justify-content: space-between;
	gap: .75rem;
	padding: .55rem 0;
	border-bottom: 1px dashed var(--geo-line);
	font-size: .92rem;
}

.geo-list li:last-child { border-bottom: 0; }

.geo-list .geo-score { font-weight: 700; white-space: nowrap; }

/* ---------- 报告头 ---------- */
.geo-report-head {
	padding: 2rem 0 0;
}

.geo-report-head .geo-domain {
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	font-weight: 800;
	word-break: break-all;
	margin: 0 0 .25rem;
}

.geo-report-head .geo-meta {
	color: var(--geo-muted);
	font-size: .9rem;
	word-break: break-all;
}

/* ---------- 总分卡 ---------- */
.geo-total {
	display: flex;
	gap: 1.25rem;
	align-items: center;
}

.geo-total .geo-ring {
	flex: 0 0 132px;
	width: 132px;
	height: 132px;
	position: relative;
}

.geo-total .geo-ring svg {
	transform: rotate(-90deg);
}

.geo-total .geo-ring .geo-ring-bg { stroke: #e9edf2; }

.geo-total .geo-ring .geo-ring-val {
	fill: none;
	stroke-width: 9;
	stroke-linecap: round;
	stroke: var(--geo-b);
}

.geo-total .geo-ring.g-A .geo-ring-val { stroke: var(--geo-a); }
.geo-total .geo-ring.g-B .geo-ring-val { stroke: var(--geo-b); }
.geo-total .geo-ring.g-C .geo-ring-val { stroke: var(--geo-c); }
.geo-total .geo-ring.g-D .geo-ring-val { stroke: var(--geo-d); }
.geo-total .geo-ring.g-E .geo-ring-val { stroke: var(--geo-e); }

.geo-total .geo-ring-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.1;
}

.geo-total .geo-ring-center strong {
	font-size: 1.9rem;
}

.geo-total .geo-ring-center small {
	color: var(--geo-muted);
	font-size: .75rem;
}

.geo-total .geo-stars {
	color: #f5b301;
	font-size: .95rem;
}

.geo-total .geo-formula {
	font-size: .82rem;
	color: var(--geo-muted);
	margin: .35rem 0 0;
}

.geo-dim-card .geo-dim-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .5rem;
	margin-bottom: .5rem;
}

.geo-dim-card .geo-dim-name {
	font-weight: 700;
	font-size: .98rem;
}

.geo-dim-card .geo-dim-score {
	font-size: 1.35rem;
	font-weight: 800;
	white-space: nowrap;
}

.geo-dim-card .geo-dim-desc {
	font-size: .84rem;
	color: var(--geo-muted);
	margin: .5rem 0 0;
	min-height: 2.5em;
}

.geo-dim-card .geo-dim-fail {
	font-size: .82rem;
	color: var(--geo-e);
	margin: .35rem 0 0;
}

/* ---------- 吸顶导航 ---------- */
.geo-sticky-nav {
	position: sticky;
	top: 0;
	z-index: 1020;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--geo-line);
	padding: .5rem 0;
}

.geo-sticky-nav .nav-link {
	color: var(--geo-muted);
	font-size: .88rem;
	padding: .35rem .7rem;
	border-radius: 6px;
	white-space: nowrap;
}

.geo-sticky-nav .nav-link:hover,
.geo-sticky-nav .nav-link.active {
	color: var(--geo-b);
	background: #e8f0fe;
}

.geo-sticky-nav .overflow-auto {
	scrollbar-width: none;
}

.geo-sticky-nav .overflow-auto::-webkit-scrollbar {
	display: none;
}

/* ---------- 表格 ---------- */
.geo-table {
	width: 100%;
	font-size: .9rem;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--geo-line);
	background: #fff;
	table-layout: auto;
}

.geo-table th,
.geo-table td {
	padding: .6rem .75rem;
	border-bottom: 1px solid var(--geo-line);
	vertical-align: top;
	word-break: break-word;
}

.geo-table th {
	background: #f3f6fa;
	font-weight: 600;
	white-space: nowrap;
}

.geo-table tr:last-child td { border-bottom: 0; }

.geo-table .geo-nowrap { white-space: nowrap; }

.geo-score-cell {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.geo-evidence {
	color: var(--geo-muted);
	font-size: .85rem;
}

.geo-status-icon {
	display: inline-block;
	width: 1.3em;
	text-align: center;
}

.geo-status-icon.ok { color: var(--geo-a); }
.geo-status-icon.partial { color: var(--geo-c); }
.geo-status-icon.error { color: var(--geo-e); }
.geo-status-icon.not_tested { color: var(--geo-muted); }

/* ---------- 代码块 ---------- */
.geo-code {
	position: relative;
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 10px;
	padding: 1rem 1rem 1rem 1.1rem;
	font-size: .82rem;
	line-height: 1.55;
	overflow: auto;
	max-height: 420px;
	margin: 0;
	white-space: pre;
	tab-size: 2;
}

.geo-code.inline {
	background: #f3f6fa;
	color: var(--geo-ink);
	border: 1px solid var(--geo-line);
}

.geo-copy {
	position: absolute;
	top: .5rem;
	right: .5rem;
	font-size: .75rem;
	padding: .15rem .55rem;
	opacity: .85;
}

.geo-copy.inline {
	background: #fff;
}

.geo-pre {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: .82rem;
	line-height: 1.5;
	background: #f3f6fa;
	border: 1px solid var(--geo-line);
	border-radius: 8px;
	padding: .5rem .65rem;
}

/* ---------- 折叠面板 ---------- */
.geo-accordion .accordion-button {
	font-size: .92rem;
	font-weight: 600;
	padding: .65rem 1rem;
}

.geo-accordion .accordion-body {
	padding: .75rem 1rem;
}

.geo-accordion .accordion-item {
	border-color: var(--geo-line);
}

/* ---------- 行动清单 ---------- */
.geo-check {
	display: flex;
	gap: .6rem;
	align-items: flex-start;
	padding: .55rem 0;
	border-bottom: 1px dashed var(--geo-line);
	font-size: .9rem;
}

.geo-check:last-child { border-bottom: 0; }

.geo-check input[type=checkbox] {
	margin-top: .2rem;
	flex: 0 0 auto;
	width: 1.05rem;
	height: 1.05rem;
}

.geo-check.done label {
	text-decoration: line-through;
	color: var(--geo-muted);
}

.geo-check label {
	cursor: pointer;
	flex: 1;
}

.geo-check .geo-check-meta {
	display: block;
	font-size: .78rem;
	color: var(--geo-muted);
	margin-top: .15rem;
}

.geo-progress-text {
	font-size: .82rem;
	color: var(--geo-muted);
}

/* ---------- FAQ ---------- */
.geo-faq dt {
	font-weight: 600;
	margin-top: .9rem;
	font-size: .98rem;
}

.geo-faq dd {
	color: #374151;
	font-size: .92rem;
	margin: .25rem 0 0;
}

/* ---------- 证据条 ---------- */
.geo-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}

.geo-chip {
	display: inline-block;
	padding: .25rem .6rem;
	border-radius: 6px;
	background: #fdecec;
	color: #b02a37;
	font-size: .8rem;
	text-decoration: none;
	border: 1px solid #f5b8b8;
}

.geo-chip:hover { background: #f9d9d9; color: #b02a37; }

.geo-empty {
	color: var(--geo-muted);
	font-size: .9rem;
}

@media (max-width: 575.98px) {
	.geo-total { flex-direction: column; text-align: center; }
	.geo-sticky-nav .nav-link { padding: .35rem .45rem; font-size: .8rem; }
	.geo-section { padding: 1.4rem 0; }
}
