.ctc-calc {
	--ctc-accent: #0b5cab;
	--ctc-border: rgba(127, 127, 127, 0.35);
	--ctc-soft: rgba(127, 127, 127, 0.09);
	max-width: 860px;
	margin: 1.5em auto;
	font-size: 16px;
	line-height: 1.45;
	box-sizing: border-box;
}
.ctc-calc *,
.ctc-calc *::before,
.ctc-calc *::after { box-sizing: border-box; }

.ctc-calc [hidden] { display: none !important; }

.ctc-title { margin: 0 0 0.8em; font-size: 1.45em; line-height: 1.25; }

.ctc-section {
	border: 1px solid var(--ctc-border);
	border-radius: 10px;
	padding: 18px 20px 20px;
	margin-bottom: 16px;
}
.ctc-section h3 {
	margin: 0 0 14px;
	font-size: 1.1em;
	color: var(--ctc-accent);
}
.ctc-section h4 { margin: 20px 0 10px; font-size: 1em; }

.ctc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px 20px;
	margin-bottom: 14px;
}
.ctc-section > .ctc-grid:last-child { margin-bottom: 0; }

.ctc-field label,
.ctc-result-label {
	display: block;
	font-size: 0.9em;
	font-weight: 600;
	margin-bottom: 6px;
}

.ctc-input,
.ctc-result-value {
	display: flex;
	align-items: center;
	gap: 8px;
}
.ctc-symbol { flex: 0 0 auto; min-width: 3.2em; font-style: italic; white-space: nowrap; }
.ctc-unit { flex: 0 0 auto; font-size: 0.9em; opacity: 0.8; white-space: nowrap; }

.ctc-input input,
.ctc-input select {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 42px;
	padding: 0 10px;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid var(--ctc-border);
	border-radius: 6px;
}
.ctc-input input { text-align: right; font-variant-numeric: tabular-nums; }
.ctc-input input:focus,
.ctc-input select:focus {
	outline: 2px solid var(--ctc-accent);
	outline-offset: 1px;
	border-color: var(--ctc-accent);
}

.ctc-hint,
.ctc-formula {
	display: block;
	margin-top: 5px;
	font-size: 0.8em;
	opacity: 0.75;
}
.ctc-formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }

.ctc-result {
	background: var(--ctc-soft);
	border-radius: 8px;
	padding: 10px 12px;
}
.ctc-result output {
	flex: 1 1 auto;
	text-align: right;
	font-size: 1.2em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.ctc-choice {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}
.ctc-choice label { cursor: pointer; margin: 0; }
.ctc-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ctc-choice span {
	display: block;
	padding: 8px 14px;
	border: 1px solid var(--ctc-border);
	border-radius: 999px;
	font-size: 0.9em;
}
.ctc-choice input:checked + span {
	background: var(--ctc-accent);
	border-color: var(--ctc-accent);
	color: #fff;
}
.ctc-choice input:focus-visible + span { outline: 2px solid var(--ctc-accent); outline-offset: 2px; }

.ctc-summary { border-color: var(--ctc-accent); border-width: 2px; }
.ctc-note { margin: 12px 0 0; font-size: 0.85em; opacity: 0.8; }

.ctc-error {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid #c62828;
	color: #c62828;
	font-size: 0.95em;
}

.ctc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ctc-btn {
	height: 44px;
	padding: 0 26px;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--ctc-accent);
	border: 1px solid var(--ctc-accent);
	border-radius: 6px;
	cursor: pointer;
}
.ctc-btn:hover { filter: brightness(1.1); }
.ctc-btn-ghost { background: transparent; color: inherit; border-color: var(--ctc-border); }

@media (max-width: 480px) {
	.ctc-section { padding: 14px; }
	.ctc-btn { flex: 1 1 auto; }
}

.ctc-eyebrow { margin: 0 0 4px; font-size: 0.8em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ctc-accent); }
.ctc-picker { margin: 0 0 16px; }
.ctc-picker label { display: block; font-size: 0.9em; font-weight: 600; margin-bottom: 6px; }
.ctc-picker select {
	width: 100%;
	max-width: 420px;
	height: 44px;
	padding: 0 10px;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 2px solid var(--ctc-accent);
	border-radius: 6px;
}
.ctc-warn {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid #b26a00;
	color: #8a5200;
	font-size: 0.9em;
}

.ctc-banner {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-left: 4px solid #b26a00;
	background: rgba(178, 106, 0, 0.08);
	border-radius: 4px;
	font-size: 0.92em;
}
.ctc-disclaimer {
	margin-top: 20px;
	padding: 16px 20px;
	border: 1px solid var(--ctc-border);
	border-radius: 10px;
	background: var(--ctc-soft);
	font-size: 0.85em;
	line-height: 1.5;
}
.ctc-disclaimer h3 { margin: 0 0 8px; font-size: 1.05em; }
.ctc-disclaimer p { margin: 0 0 8px; }
.ctc-disclaimer p:last-child { margin-bottom: 0; }

/* ---------- Desenhos ---------- */
.ctc-figure {
	display: grid;
	grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
	gap: 12px;
	margin: 0 0 20px;
}
.ctc-mobile-hint { display: none; font-weight: 600; }
.ctc-figure figcaption {
	grid-column: 1 / -1;
	font-size: 0.8em;
	opacity: 0.75;
}
.ctc-svg {
	display: block;
	width: 100%;
	height: auto;
	color: #1d2733;
	background: #f6f8fb;
	border: 1px solid #d9dfe7;
	border-radius: 8px;
	font-family: inherit;
	-webkit-user-select: none;
	user-select: none;
}
.ctc-svg .cap { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; fill: #5b6878; }
.ctc-svg .sub, .ctc-svg .note { font-size: 11px; fill: #5b6878; }
.ctc-svg .note-in { font-size: 11px; fill: #3a4654; font-weight: 600; }
.ctc-svg .metal { fill: #dfe4ea; stroke: #4a5664; stroke-width: 1.4; }
.ctc-svg .metal2 { fill: #b9c2cd; stroke: #4a5664; stroke-width: 1.4; }
.ctc-svg .rim { fill: none; stroke: #4a5664; stroke-width: 1; opacity: 0.55; }
.ctc-svg .hub { fill: #4a5664; }
.ctc-svg .hollow { fill: #f6f8fb; stroke: #4a5664; stroke-width: 1; stroke-dasharray: 3 2; }
.ctc-svg .load { fill: #d6e6f7; stroke: #2b6cb0; stroke-width: 1.4; }
.ctc-svg .cabin { fill: rgba(223, 228, 234, 0.5); stroke: #4a5664; stroke-width: 1.6; }
.ctc-svg .base { fill: #e9edf2; stroke: #4a5664; stroke-width: 1.2; }
.ctc-svg .hl { stroke: #8793a1; stroke-width: 1; }
.ctc-svg .rail { fill: #c8d0da; stroke: #4a5664; stroke-width: 1.2; }
.ctc-svg .frame { stroke: #4a5664; stroke-width: 6; stroke-linecap: round; opacity: 0.35; }
.ctc-svg .thread { stroke: #4a5664; stroke-width: 1.4; }
.ctc-svg .rope { stroke: #4a5664; stroke-width: 2.4; }
.ctc-svg .chain { fill: none; stroke: #4a5664; stroke-width: 4.5; stroke-dasharray: 5 2.2; }
.ctc-svg .drive { fill: #f59f00; stroke: #8a5a00; stroke-width: 1; }
.ctc-svg .drive-c { fill: #8a5a00; }
.ctc-svg .ext { stroke: #8793a1; stroke-width: 0.9; stroke-dasharray: 3 3; }
.ctc-svg .dim { stroke: #4a5664; stroke-width: 1.1; }
.ctc-svg .mk { fill: #4a5664; }
.ctc-svg .vel { stroke: var(--ctc-accent, #0b5cab); stroke-width: 3.5; }
.ctc-svg .mkv { fill: var(--ctc-accent, #0b5cab); }

.ctc-svg .ctc-tag { cursor: pointer; outline: none; }
.ctc-svg .ctc-tag .pill { fill: #fff; stroke: var(--ctc-accent, #0b5cab); stroke-width: 1.3; transition: fill 0.15s; }
.ctc-svg .ctc-tag .tt { font-size: 13px; }
.ctc-svg .ctc-tag .s { font-size: 15px; font-weight: 700; font-style: italic; fill: var(--ctc-accent, #0b5cab); }
.ctc-svg .ctc-tag .t { fill: #3a4654; }
.ctc-svg .ctc-tag .ld { stroke: var(--ctc-accent, #0b5cab); stroke-width: 1.2; }
.ctc-svg .ctc-tag .dot { fill: var(--ctc-accent, #0b5cab); }
.ctc-svg .ctc-tag:hover .pill,
.ctc-svg .ctc-tag:focus-visible .pill,
.ctc-svg .ctc-tag.is-active .pill { fill: var(--ctc-accent, #0b5cab); }
.ctc-svg .ctc-tag:hover .s, .ctc-svg .ctc-tag:hover .t,
.ctc-svg .ctc-tag:focus-visible .s, .ctc-svg .ctc-tag:focus-visible .t,
.ctc-svg .ctc-tag.is-active .s, .ctc-svg .ctc-tag.is-active .t { fill: #fff; }
.ctc-svg .ctc-tag.is-active .ld,
.ctc-svg .ctc-tag.is-active .dim,
.ctc-svg .ctc-tag:hover .dim { stroke: var(--ctc-accent, #0b5cab); stroke-width: 2.2; }
.ctc-svg .ctc-tag.is-active .dot { r: 5; }
.ctc-svg .ctc-tag:focus-visible .pill { stroke-width: 3; }

.ctc-field.is-linked label { color: var(--ctc-accent); }
.ctc-field.is-linked input,
.ctc-field.is-linked select { border-color: var(--ctc-accent); box-shadow: 0 0 0 3px rgba(11, 92, 171, 0.15); }

@keyframes ctc-flash { 0% { box-shadow: 0 0 0 0 rgba(11, 92, 171, 0.5); } 100% { box-shadow: 0 0 0 14px rgba(11, 92, 171, 0); } }
.ctc-result.is-flash { animation: ctc-flash 0.9s ease-out 2; }

@media (max-width: 640px) {
	.ctc-figure { grid-template-columns: 1fr; }
	.ctc-mobile-hint { display: inline; }
	.ctc-fig-main { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; }
	.ctc-fig-main .ctc-svg { width: 540px; max-width: none; }
	.ctc-fig-drive { max-width: 340px; width: 100%; justify-self: center; }
}
.ctc-svg .label-bg { fill: #f6f8fb; }

/* ---------- Memorial em PDF ---------- */
.ctc-lead { margin: 0 0 14px; font-size: 0.92em; opacity: 0.85; }
.ctc-calc textarea {
	width: 100%;
	padding: 8px 10px;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid var(--ctc-border);
	border-radius: 6px;
	resize: vertical;
}
.ctc-calc textarea:focus { outline: 2px solid var(--ctc-accent); outline-offset: 1px; border-color: var(--ctc-accent); }
.ctc-input input[data-ctc-meta] { text-align: left; }
.ctc-actions-pdf { align-items: center; margin-top: 14px; }
.ctc-section.ctc-pdf { margin-top: 20px; }
.ctc-btn-pdf { display: inline-flex; align-items: center; gap: 8px; }
.ctc-btn:disabled { opacity: 0.6; cursor: progress; }
.ctc-pdf-status { font-size: 0.9em; }
.ctc-pdf-status.is-erro { color: #c62828; }
.ctc-pdf .ctc-field + .ctc-field { margin-top: 0; }

.ctc-logo { display: block; height: 56px; width: auto; margin: 0 0 10px; }

/* ---------- Vaso de pressão e materiais ---------- */
.ctc-figure-1 { grid-template-columns: minmax(0, 1fr); }
.ctc-figure-1 .ctc-fig-main { max-width: 720px; width: 100%; justify-self: center; }
.ctc-svg .fluido { fill: #e3eefa; }
.ctc-svg .secao { stroke: #4a5664; stroke-width: 1.3; }
.ctc-svg .secao-c { fill: #dfe4ea; }
.ctc-svg .ca { fill: none; stroke: #c0392b; stroke-width: 1; stroke-dasharray: 4 3; opacity: 0.8; }
.ctc-svg .solda { fill: #4a5664; }
.ctc-svg .solda-l { fill: none; stroke: #4a5664; stroke-width: 1.6; }
.ctc-svg .eixo-g { stroke: #8793a1; stroke-width: 1; }
.ctc-svg .grade-g { stroke: #dfe4ea; stroke-width: 1; }
.ctc-svg .curva { fill: none; stroke: var(--ctc-accent, #2a6aa8); stroke-width: 2.6; stroke-linejoin: round; }
.ctc-svg .pt-tab { fill: #fff; stroke: var(--ctc-accent, #2a6aa8); stroke-width: 1.6; }
.ctc-svg .pt-sel { fill: #f59f00; stroke: #8a5a00; stroke-width: 1.4; }
.ctc-svg .lbl { font-size: 11px; fill: #5b6878; }
.ctc-svg .lbl-b { font-size: 12px; font-weight: 700; fill: #1d2733; }
.ctc-empty { padding: 18px 20px; border: 1px dashed var(--ctc-border); border-radius: 10px; }
.ctc-empty h3 { margin: 0 0 6px; font-size: 1.05em; }
.ctc-calc select[data-ctc-mat] { font: inherit; }
.ctc-mat-row { overflow-x: auto; }
.ctc-mat-row table { border-collapse: collapse; font-size: 0.85em; min-width: 100%; }
.ctc-mat-row th, .ctc-mat-row td { border: 1px solid var(--ctc-border); padding: 4px 6px; text-align: right; white-space: nowrap; }
.ctc-mat-row th:first-child, .ctc-mat-row td:first-child { text-align: left; }
.ctc-mat-row td.is-sel { background: rgba(245, 159, 0, 0.18); font-weight: 700; }
.ctc-fonte { font-size: 0.8em; opacity: 0.75; margin: 8px 0 0; }
