/* 提前还房贷计算器：沿用站点 tool-form / form-input / btn / table 风格，仅补充本工具所需布局 */
.tqhd-page {
	width: 92%;
	max-width: 1120px;
}
.tqhd-page * { box-sizing: border-box; }
.tqhd-page .tool-title { padding-bottom: 1rem; }
.tqhd-page .tqhd-sub {
	clear: both;
	padding-top: 4px;
	font-size: .8125rem;
	color: #888;
}
.tqhd-page .tqhd-grid {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}
.tqhd-page .tqhd-panel {
	padding: 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}
.tqhd-page .tqhd-panel-title {
	margin: 0 0 12px;
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.5;
	color: #333;
}
.tqhd-page .tqhd-panel-title small {
	font-size: .75rem;
	font-weight: 400;
	color: #888;
}
.tqhd-page .tqhd-hint { padding-top: 2px; font-size: .75rem; line-height: 1.6; }

/* 提前还款计划 */
.tqhd-page .tqhd-plan {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed #ddd;
}
.tqhd-page .tqhd-plan > .tips { padding-bottom: 8px; line-height: 1.6; }
.tqhd-page .tqhd-plan-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 10px;
}
.tqhd-page .tqhd-empty { padding: 6px 0; font-size: .8125rem; color: #888; }
.tqhd-page .tqhd-plan-row {
	display: grid;
	grid-template-columns: 1fr 1fr 28px;
	gap: 6px 8px;
	padding: 8px;
	border: 1px solid #eee;
	border-radius: 4px;
	background: #fafafa;
}
.tqhd-page .tqhd-lbl { margin-bottom: 3px; font-size: 11px; line-height: 1.4; color: #888; }
.tqhd-page .tqhd-plan-row input,
.tqhd-page .tqhd-plan-row select {
	width: 100%;
	height: 28px;
	padding: 2px 6px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 12px;
	color: #555;
	outline: none;
}
.tqhd-page .tqhd-plan-row input:focus,
.tqhd-page .tqhd-plan-row select:focus { border-color: #28a745; }
.tqhd-page .tqhd-mode { grid-column: 1 / 3; }
.tqhd-page .tqhd-del {
	height: 28px;
	align-self: end;
	border: 0;
	background: none;
	font-size: 16px;
	line-height: 1;
	color: #999;
	cursor: pointer;
}
.tqhd-page .tqhd-del:hover { color: #d9534f; }
.tqhd-page .tqhd-main-btn { margin-top: 14px; }
.tqhd-page .tqhd-err { min-height: 18px; margin-top: 8px; font-size: .8125rem; color: #d9534f; }

/* 结果区 */
.tqhd-page .tqhd-result-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}
.tqhd-page .tqhd-result-head .tqhd-panel-title { margin: 0; }
.tqhd-page .tqhd-head-btns { display: flex; gap: 6px; }
.tqhd-page .tqhd-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}
.tqhd-page .tqhd-stat {
	padding: 10px 12px;
	border: 1px solid #eee;
	border-radius: 4px;
	background: #f7f7f7;
}
.tqhd-page .tqhd-stat .k { margin-bottom: 4px; font-size: .75rem; color: #888; }
.tqhd-page .tqhd-stat .v { font-size: 1.0625rem; font-weight: 700; color: #333; word-break: break-all; }
.tqhd-page .tqhd-stat .v.green { color: #28a745; }

.tqhd-page .tqhd-cmp { width: 100%; margin-bottom: 14px; font-size: .8125rem; }
.tqhd-page .tqhd-cmp th,
.tqhd-page .tqhd-cmp td { padding: 6px 8px; text-align: right; }
.tqhd-page .tqhd-cmp th:first-child,
.tqhd-page .tqhd-cmp td:first-child { text-align: left; color: #666; }
.tqhd-page .tqhd-cmp thead th { color: #333; }
.tqhd-page .tqhd-save { color: #d9534f; font-weight: 700; }
.tqhd-page .tqhd-hl { color: #28a745; font-weight: 700; }

.tqhd-page .tqhd-detail-btn { display: block; width: 100%; margin-bottom: 10px; }
.tqhd-page .tqhd-tbl-wrap {
	max-height: 400px;
	overflow: auto;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.tqhd-page .tqhd-dtl { width: 100%; margin-bottom: 0; font-size: .75rem; white-space: nowrap; }
.tqhd-page .tqhd-dtl thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 6px;
	background: #f2f2f2;
	text-align: right;
	white-space: nowrap;
}
.tqhd-page .tqhd-dtl thead th:first-child { text-align: center; }
.tqhd-page .tqhd-dtl tbody td { padding: 4px 6px; text-align: right; white-space: nowrap; }
.tqhd-page .tqhd-dtl tbody td:first-child { text-align: center; }
.tqhd-page .tqhd-dtl tbody td:last-child { text-align: left; white-space: normal; }
.tqhd-page .tqhd-dtl tr.tqhd-pre td { background: #fff8e8; color: #a06a00; font-weight: 600; }
.tqhd-page .tqhd-dtl tr.tqhd-pre:hover td { background: #fff3d6; }
.tqhd-page .tqhd-dtl tr.tqhd-last td { color: #28a745; font-weight: 700; }
.tqhd-page .tqhd-sum { padding-top: 6px; text-align: right; }
.tqhd-page .tqhd-note { padding-top: 12px; line-height: 1.8; }

/* 说明内容 */
.tqhd-page .tqhd-steps { margin: 0 0 10px; padding-left: 20px; }
.tqhd-page .tqhd-steps li { margin-bottom: 4px; font-size: .875rem; line-height: 1.8; color: #666; }
.tqhd-page .tool-info pre { font-size: 12px; line-height: 1.9; white-space: pre-wrap; word-break: normal; }
.tqhd-page .tqhd-scenes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
}
.tqhd-page .tqhd-scene {
	padding: 10px 12px;
	border: 1px solid #eee;
	border-radius: 4px;
	background: #f7f7f7;
}
.tqhd-page .tqhd-scene .t { margin-bottom: 4px; font-size: .875rem; font-weight: 700; color: #333; }
.tqhd-page .tqhd-scene .d { font-size: .8125rem; line-height: 1.7; color: #666; }
.tqhd-page .tqhd-faq details {
	margin-bottom: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}
.tqhd-page .tqhd-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 12px;
	background: #fafafa;
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.6;
	color: #333;
	cursor: pointer;
	list-style: none;
}
.tqhd-page .tqhd-faq summary::-webkit-details-marker { display: none; }
.tqhd-page .tqhd-faq summary::after { content: "▾"; flex: none; font-size: 12px; color: #888; transition: transform .2s; }
.tqhd-page .tqhd-faq details[open] summary::after { transform: rotate(180deg); }
.tqhd-page .tqhd-faq details p {
	margin: 0;
	padding: 8px 12px;
	font-size: .875rem;
	line-height: 1.8;
	color: #666;
}

/* 轻提示 */
.tqhd-toast {
	position: fixed;
	left: 50%;
	bottom: 36px;
	z-index: 9999;
	transform: translate(-50%, 12px);
	padding: 10px 18px;
	border-radius: 4px;
	background: rgba(51, 51, 51, .92);
	font-size: 13px;
	color: #fff;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s, transform .25s;
}
.tqhd-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
	.tqhd-page .tqhd-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.tqhd-page { width: 94%; }
	.tqhd-page .tqhd-stats { grid-template-columns: 1fr; }
	.tqhd-page .tqhd-cmp { font-size: .75rem; }
	.tqhd-page .tqhd-cmp th, .tqhd-page .tqhd-cmp td { padding: 5px 4px; }
}
