.apph1-wrap {
	--apph1-primary: #7c3aed;
	--apph1-primary-dark: #6d28d9;
	--apph1-bg: #ffffff;
	--apph1-bg-soft: #f8f7fc;
	--apph1-border: #e5e1f5;
	--apph1-text: #1e1b2e;
	--apph1-text-muted: #6b6580;
	--apph1-radius: 14px;
	--apph1-score1: #ef4444;
	--apph1-score2: #f97316;
	--apph1-score3: #eab308;
	--apph1-score4: #84cc16;
	--apph1-score5: #16a34a;
	max-width: 880px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--apph1-text);
	line-height: 1.55;
}

.apph1-wrap * { box-sizing: border-box; }

.apph1-breadcrumb { font-size: 0.85rem; color: var(--apph1-text-muted); margin: 4px 0 16px; }
.apph1-breadcrumb a { color: var(--apph1-text-muted); text-decoration: none; }
.apph1-breadcrumb a:hover { color: var(--apph1-primary); }
.apph1-breadcrumb span { margin: 0 6px; }

.apph1-card {
	background: var(--apph1-bg);
	border: 1px solid var(--apph1-border);
	border-radius: var(--apph1-radius);
	padding: 24px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.apph1-card a { color: var(--apph1-primary-dark); font-weight: 600; text-decoration: none; }
.apph1-card a:hover { text-decoration: underline; }

.apph1-header { margin-bottom: 20px; }
.apph1-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
.apph1-title-sm { font-size: 1.2rem; font-weight: 700; margin: 0 0 12px; }
.apph1-subtitle { color: var(--apph1-text-muted); margin: 0 0 16px; font-size: 0.95rem; }

.apph1-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .apph1-grid { grid-template-columns: 1fr 1fr; } }

.apph1-field { margin-bottom: 22px; }
.apph1-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.apph1-field-hint { display: block; font-weight: 400; font-size: 0.78rem; color: var(--apph1-text-muted); margin-top: 2px; }
.apph1-field-hint select {
	margin-top: 4px;
	font-size: 0.8rem;
	padding: 3px 6px;
	border: 1px solid var(--apph1-border);
	border-radius: 6px;
	background: var(--apph1-bg-soft);
	color: var(--apph1-text);
	max-width: 100%;
}
.apph1-wrap input[type="range"] { width: 100%; margin: 10px 0 6px; accent-color: var(--apph1-primary); }
.apph1-field-value { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--apph1-text-muted); }
.apph1-field-value input[type="number"] {
	width: 60px;
	border: 1px solid var(--apph1-border);
	border-radius: 8px;
	padding: 6px 8px;
	background: var(--apph1-bg-soft);
	font-weight: 700;
	color: var(--apph1-text);
	text-align: center;
}

.apph1-results { background: var(--apph1-bg-soft); border-radius: var(--apph1-radius); padding: 20px; align-self: start; }
.apph1-result-hero { text-align: center; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px dashed var(--apph1-border); }
.apph1-result-label { display: block; font-size: 0.82rem; color: var(--apph1-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.apph1-result-value { display: block; font-size: 3rem; font-weight: 800; color: var(--apph1-primary-dark); line-height: 1.1; }
.apph1-result-sub { color: var(--apph1-text-muted); font-size: 0.95rem; font-weight: 600; }

.apph1-composite-bar-wrap { margin-bottom: 16px; }
.apph1-composite-bar-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--apph1-text-muted); margin-bottom: 6px; font-weight: 600; }
.apph1-composite-bar { height: 10px; border-radius: 999px; background: var(--apph1-border); overflow: hidden; }
.apph1-composite-bar-fill { height: 100%; background: linear-gradient(90deg, #7c3aed, #4f46e5); border-radius: 999px; transition: width 0.2s ease; width: 0%; }
.apph1-next-band { font-size: 0.8rem; color: var(--apph1-text-muted); margin: 8px 0 0; }

.apph1-breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.apph1-breakdown-table td { padding: 7px 0; border-bottom: 1px solid var(--apph1-border); }
.apph1-breakdown-table td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.apph1-row-total td { border-bottom: none; border-top: 2px solid var(--apph1-primary); padding-top: 10px; font-size: 0.98rem; }
.apph1-row-total td:first-child { font-weight: 700; }
.apph1-row-total td:last-child { color: var(--apph1-primary-dark); font-weight: 800; }

.apph1-disclaimer { font-size: 0.78rem; color: var(--apph1-text-muted); margin: 16px 0 0; line-height: 1.5; }

.apph1-formula-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }
.apph1-formula-item { text-align: center; background: var(--apph1-bg-soft); border-radius: 10px; padding: 16px 10px; }
.apph1-formula-pct { display: block; font-size: 1.5rem; font-weight: 800; color: var(--apph1-primary); }
.apph1-formula-item strong { display: block; font-size: 0.88rem; margin: 4px 0 2px; }
.apph1-formula-item p { margin: 0; font-size: 0.78rem; color: var(--apph1-text-muted); }

.apph1-example-box { background: var(--apph1-bg-soft); border-left: 3px solid var(--apph1-primary); border-radius: 8px; padding: 16px 18px; margin-top: 16px; }
.apph1-example-box h4 { margin: 0 0 8px; font-size: 0.95rem; }
.apph1-example-box p { margin: 0 0 8px; font-size: 0.9rem; }
.apph1-example-box ul { margin: 0; padding-left: 18px; font-size: 0.88rem; }
.apph1-example-box li { margin-bottom: 4px; }

.apph1-score-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 16px 0; }
.apph1-score-table th { text-align: left; padding: 10px 8px; background: var(--apph1-bg-soft); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--apph1-text-muted); }
.apph1-score-table td { padding: 10px 8px; border-bottom: 1px solid var(--apph1-border); }
.apph1-score-table td:first-child { font-weight: 800; font-size: 1.05rem; text-align: center; width: 50px; }
.apph1-frq-table td:nth-child(3), .apph1-frq-table td:nth-child(4) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.apph1-score-5 { color: var(--apph1-score5); }
.apph1-score-4 { color: var(--apph1-score4); }
.apph1-score-3 { color: var(--apph1-score3); }
.apph1-score-2 { color: var(--apph1-score2); }
.apph1-score-1 { color: var(--apph1-score1); }
.apph1-table-note { font-size: 0.8rem; color: var(--apph1-text-muted); margin: 0 0 12px; }

.apph1-steps { margin: 0; padding-left: 22px; }
.apph1-steps li { margin-bottom: 12px; font-size: 0.92rem; }

.apph1-explore-card { text-align: center; background: var(--apph1-bg-soft); }
.apph1-btn {
	display: inline-block;
	margin-top: 10px;
	padding: 12px 24px;
	background: var(--apph1-primary);
	color: #fff !important;
	border-radius: 10px;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 0.92rem;
}
.apph1-btn:hover { background: var(--apph1-primary-dark); }

.apph1-faq-item { border-bottom: 1px solid var(--apph1-border); padding: 14px 0; }
.apph1-faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.apph1-faq-item h4 { margin: 0 0 6px; font-size: 1rem; }
.apph1-faq-item p { margin: 0; color: var(--apph1-text-muted); font-size: 0.92rem; }

@media (max-width: 520px) {
	.apph1-card { padding: 18px 16px; }
	.apph1-score-table { font-size: 0.8rem; }
	.apph1-score-table th, .apph1-score-table td { padding: 8px 5px; }
}

@media (prefers-color-scheme: dark) {
	.apph1-wrap:not([data-theme="light"]) {
		--apph1-bg: #17141f;
		--apph1-bg-soft: #0f0d16;
		--apph1-border: #2e2840;
		--apph1-text: #f3f1fa;
		--apph1-text-muted: #a79fc2;
	}
}
.apph1-wrap[data-theme="dark"] {
	--apph1-bg: #17141f;
	--apph1-bg-soft: #0f0d16;
	--apph1-border: #2e2840;
	--apph1-text: #f3f1fa;
	--apph1-text-muted: #a79fc2;
}
