/* TechTrade FD Calculator - v1.0.0 */

.ttppf-wrap {
	--ttppf-accent: #0b5fff;
	--ttppf-principal: #c9d6ff;
	--ttppf-interest: var(--ttppf-accent);
	--ttppf-bg: #ffffff;
	--ttppf-soft: #f4f6fb;
	--ttppf-border: #e4e8f0;
	--ttppf-text: #1b2330;
	--ttppf-muted: #6b7482;
	--ttppf-max: 1140px;
	max-width: var(--ttppf-max);
	width: 100%;
	margin: 0 auto;
	color: var(--ttppf-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.ttppf-wrap *, .ttppf-wrap *::before, .ttppf-wrap *::after { box-sizing: border-box; }

.ttppf-card {
	background: var(--ttppf-bg);
	border: 1px solid var(--ttppf-border);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 14px 40px rgba(20, 30, 60, 0.07);
}

.ttppf-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 44px; padding: 40px; }

.ttppf-controls { display: flex; flex-direction: column; gap: 28px; justify-content: center; }
.ttppf-field-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ttppf-label { font-size: 15px; font-weight: 500; color: var(--ttppf-muted); }
.ttppf-freq-label { display: block; margin-bottom: 8px; }

.ttppf-input-box {
	display: inline-flex; align-items: center; gap: 2px; background: var(--ttppf-soft);
	border: 1px solid var(--ttppf-border); border-radius: 10px; padding: 8px 12px;
	min-width: 140px; justify-content: flex-end;
}
.ttppf-input-box:focus-within { border-color: var(--ttppf-accent); background: #fff; }
.ttppf-prefix, .ttppf-suffix { font-size: 16px; font-weight: 600; color: var(--ttppf-accent); }
.ttppf-input-box input {
	width: 100%; max-width: 130px; border: 0; background: transparent; text-align: right;
	font-size: 17px; font-weight: 700; color: var(--ttppf-text); padding: 0; -moz-appearance: textfield;
}
.ttppf-input-box input:focus { outline: none; }
.ttppf-input-box input::-webkit-outer-spin-button,
.ttppf-input-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ttppf-freq {
	width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--ttppf-border);
	background: var(--ttppf-soft); border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ttppf-text);
}
.ttppf-freq:focus { outline: none; border-color: var(--ttppf-accent); background: #fff; }

.ttppf-slider {
	-webkit-appearance: none; appearance: none; width: 100%; height: 7px; border-radius: 999px;
	background: var(--ttppf-border); outline: none; cursor: pointer;
}
.ttppf-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ttppf-accent); border: 4px solid #fff; box-shadow: 0 1px 6px rgba(20,30,60,0.3); cursor: pointer; }
.ttppf-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--ttppf-accent); border: 4px solid #fff; box-shadow: 0 1px 6px rgba(20,30,60,0.3); cursor: pointer; }

.ttppf-result { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--ttppf-soft); border-radius: 16px; padding: 34px 28px; }
.ttppf-chart { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.ttppf-donut { width: 210px; height: 210px; }
.ttppf-donut-track { stroke: var(--ttppf-principal); }
.ttppf-donut-value { stroke: var(--ttppf-interest); transition: stroke-dasharray 0.4s ease; }
.ttppf-legend { display: flex; gap: 22px; font-size: 14px; color: var(--ttppf-muted); }
.ttppf-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.ttppf-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.ttppf-dot-principal { background: var(--ttppf-principal); }
.ttppf-dot-interest { background: var(--ttppf-interest); }

.ttppf-figures { width: 100%; max-width: 340px; }
.ttppf-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-size: 16px; color: var(--ttppf-muted); border-bottom: 1px dashed var(--ttppf-border); }
.ttppf-row strong { font-size: 17px; color: var(--ttppf-text); }
.ttppf-row-total { border-bottom: 0; padding-top: 14px; }
.ttppf-row-total span, .ttppf-row-total strong { font-size: 21px; font-weight: 800; color: var(--ttppf-text); }

.ttppf-cta { display: block; width: 100%; margin-top: 22px; padding: 16px 18px; text-align: center; background: var(--ttppf-accent); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; border-radius: 12px; transition: filter 0.15s ease; }
.ttppf-cta:hover { filter: brightness(0.93); color: #fff; }
.ttppf-disclaimer-note { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--ttppf-muted); text-align: center; }

/* About */
.ttppf-about { margin-top: 40px; padding: 8px 4px; font-size: 16px; line-height: 1.75; color: #333c4a; }
.ttppf-about h2 { font-size: 28px; font-weight: 800; color: var(--ttppf-text); margin: 0 0 16px; }
.ttppf-about h3 { font-size: 20px; font-weight: 700; color: var(--ttppf-text); margin: 30px 0 12px; }
.ttppf-about p { margin: 0 0 14px; }
.ttppf-formula { background: var(--ttppf-soft); border: 1px solid var(--ttppf-border); border-radius: 10px; padding: 16px 18px; font-size: 17px; font-weight: 600; color: var(--ttppf-text); text-align: center; margin: 6px 0 14px; overflow-x: auto; }
.ttppf-example { background: rgba(11,95,255,0.06); border-left: 3px solid var(--ttppf-accent); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 6px 0 14px; }
.ttppf-steps { margin: 0 0 14px; padding-left: 22px; }
.ttppf-steps li { margin-bottom: 8px; }

.ttppf-faqs details { border: 1px solid var(--ttppf-border); border-radius: 10px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.ttppf-faqs summary { cursor: pointer; padding: 15px 18px; font-size: 16px; font-weight: 600; color: var(--ttppf-text); list-style: none; position: relative; padding-right: 44px; }
.ttppf-faqs summary::-webkit-details-marker { display: none; }
.ttppf-faqs summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--ttppf-accent); line-height: 1; }
.ttppf-faqs details[open] summary::after { content: "\2212"; }
.ttppf-faqs details[open] summary { border-bottom: 1px solid var(--ttppf-border); }
.ttppf-faqs .ttppf-faq-a p { margin: 0; padding: 14px 18px; font-size: 15px; color: #4a5260; }

.ttppf-page-disclaimer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--ttppf-border); font-size: 12px; line-height: 1.6; color: var(--ttppf-muted); }
.ttppf-page-disclaimer p { margin: 0 0 8px; }
.ttppf-page-disclaimer a { color: var(--ttppf-accent); text-decoration: underline; }

@media (max-width: 860px) {
	.ttppf-body { grid-template-columns: 1fr; gap: 30px; padding: 24px; }
	.ttppf-donut { width: 180px; height: 180px; }
	.ttppf-about h2 { font-size: 24px; }
}
