/* Shared engine presentation: Bootstrap forms, utility forms and custom engines. */
.td-page .tool-app {
    --tu-primary: #2563eb;
    --tu-radius: 12px;
    --tu-radius-sm: 8px;
    --tu-border: #dfe5ee;
    --tu-sunken: #f8fafc;
    font-family: var(--font-sans, Inter), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.65;
}
.td-page .tool-app *, .td-page .tool-app *::before, .td-page .tool-app *::after { box-sizing: border-box; }
.td-page .tool-app :is(h1,h2,h3,h4,h5,h6,button,input,select,textarea,label) { font-family: inherit; }
.td-page .tool-app :is(h2,h3) { font-weight: 650; letter-spacing: -.025em; }
.td-page .tool-app :is(h1,h2,h3,h4,h5,h6) { color: #17243c !important; }
.td-page .tool-app :is([class*="-card"]):not([class*="swatch"]):not([class*="palette"]):not([class*="mockup"]) > :is(h2,h3,h4,p) { color: inherit; }
.td-page .tool-app :is(h4,h5,h6) { font-weight: 650; letter-spacing: -.01em; }
.td-page .tool-app .card { border: 1px solid var(--tu-border); border-radius: 12px !important; box-shadow: none !important; }
.td-page .tool-app .card-header { padding: 18px 20px; background: #f8fafc !important; border-bottom: 1px solid var(--tu-border); }
.td-page .tool-app .card-body { padding: 24px; }
.td-page .tool-app :is(.shadow,.shadow-sm,.shadow-md,.shadow-lg,.shadow-xl,.shadow-2xl) { box-shadow: none !important; }
.td-page .tool-app :is(.text-xs,.small,.form-text) { font-size: 13px !important; line-height: 1.6; }
.td-page .tool-app .text-sm { font-size: 14px !important; }
.td-page .tool-app :is(.form-label,label) { font-size: 13px; font-weight: 600; line-height: 1.5; color: #334155; }
.td-page .tool-app .flex > label { flex-shrink: 0; }
.td-page .tool-app .flex > select { min-width: 100px; }
.td-page .tool-app div:has(> [class*="curr-symbol"]) > input { padding-left: 34px !important; }
.td-page .tool-app div:has(> [class*="input-prefix"]) > input { padding-left: 34px !important; }
.td-page .tool-app :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=color]),select,textarea) {
    font-size: 16px !important; font-weight: 400 !important; border-radius: 8px !important;
    border-color: #cfd8e5 !important; box-shadow: 0 1px 2px #0f172a04;
}
.td-page .tool-app :is(input,select,textarea):focus { border-color: #2563eb !important; box-shadow: 0 0 0 3px #2563eb18; }
.td-page .tool-app button { font-size: 14px; font-weight: 600; line-height: 1.45; border-radius: 8px; transition: background-color .15s, border-color .15s; }
.td-page .tool-app button:disabled { opacity: .5; cursor: not-allowed; }
.td-page .tool-app .tool-btn { min-height: 44px; background: #2563eb; border: 1px solid #2563eb; color: #fff; box-shadow: none; }
.td-page .tool-app .tool-btn-clear { background: #fff; border-color: #cfd8e5; color: #475569; }
.td-page .tool-app :is(.border.rounded-xl,.border.rounded-2xl,.border.rounded-3xl) { border-radius: 12px !important; }
.td-page .tool-app:not([data-tool-slug*="color"]):not([data-tool-slug*="palette"]):not([data-tool-slug*="gradient"]) :is(.bg-gradient,.bg-gradient-to-r,.bg-gradient-to-br):has(h2,h3):not(:has(canvas,svg,input)) {
    background: #f8fafc !important; border: 1px solid #dfe5ee; color: #334155 !important;
}
.td-page .tool-app:not([data-tool-slug*="color"]):not([data-tool-slug*="palette"]):not([data-tool-slug*="gradient"]) :is(.bg-gradient,.bg-gradient-to-r,.bg-gradient-to-br):has(h2,h3):not(:has(canvas,svg,input)) :is(p,span) { color: #475569 !important; }
/* Utility engines use coloured buttons without Bootstrap's .btn class. */
.td-page .tool-app button:is(.bg-blue-500,.bg-blue-600,.bg-blue-700,.bg-indigo-600,.bg-purple-600,.bg-violet-600,.bg-emerald-500,.bg-emerald-600,.bg-green-600,.bg-cyan-600,.bg-amber-500,.bg-amber-600,.bg-red-600,.bg-slate-800,.bg-slate-900),
.td-page .tool-app :is(.btn-primary,.btn-success,.btn-danger,.btn-warning) {
    background: #2563eb !important; border: 1px solid #2563eb !important; color: #fff !important; box-shadow: none !important;
}
.td-page .tool-app button:is(.bg-blue-500,.bg-blue-600,.bg-blue-700,.bg-indigo-600,.bg-purple-600,.bg-violet-600,.bg-emerald-500,.bg-emerald-600,.bg-green-600,.bg-cyan-600,.bg-amber-500,.bg-amber-600,.bg-red-600,.bg-slate-800,.bg-slate-900):hover,
.td-page .tool-app :is(.btn-primary,.btn-success,.btn-danger,.btn-warning):hover { background: #1d4ed8 !important; border-color: #1d4ed8 !important; }
.td-page .tool-app button:is(.bg-blue-500,.bg-blue-600,.bg-blue-700,.bg-indigo-600,.bg-purple-600,.bg-violet-600,.bg-emerald-500,.bg-emerald-600,.bg-green-600,.bg-cyan-600,.bg-amber-500,.bg-amber-600,.bg-red-600,.bg-slate-800,.bg-slate-900) :is(i,span) { color: inherit !important; }
.td-page .tool-app :is(.btn-outline-secondary,.btn-light,.btn-secondary) { background: #fff !important; border-color: #cfd8e5 !important; color: #475569 !important; box-shadow: none !important; }
.td-page .tool-app :is(.nav-pills,.nav-tabs) { border: 1px solid var(--tu-border); background: #f8fafc; border-radius: 10px; padding: 4px; gap: 4px; }
.td-page .tool-app :is(.nav-pills,.nav-tabs) .nav-link { font-size: 13px; min-height: 40px; border-radius: 7px; box-shadow: none !important; }
.td-page .tool-app :is(.nav-pills,.nav-tabs) .nav-link.active { background: #fff !important; border: 1px solid #dbe3ef; color: #1d4ed8 !important; }
/* File tools share a real drop area; decorative upload icons stay square. */
.td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]) {
    position: relative; border: 1.5px dashed #b8c8e0 !important; border-radius: 12px !important;
    background: #f8faff !important; padding: 36px 24px !important; text-align: center;
    cursor: pointer; transition: border-color .15s, background-color .15s;
}
.td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]):is(:hover,:focus-within) { border-color: #2563eb !important; background: #eff5ff !important; }
.td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]) > div:is(.w-12,.w-14,.w-16,.w-20,.w-24):has(> i) {
    width: 52px !important; height: 52px !important; margin: 0 auto 16px !important;
    display: grid !important; place-items: center; border-radius: 14px !important;
    background: #e8efff !important; color: #2563eb !important;
}
.td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]) > div:is(.w-12,.w-14,.w-16,.w-20,.w-24):has(> i)::before {
    content: ""; width: 24px; height: 24px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m-4 4 4-4 4 4M4 15v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E");
}
.td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]) > div:is(.w-12,.w-14,.w-16,.w-20,.w-24):has(> i) > i { display: none; }
.td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]) p { margin: 8px 0 0; }
.td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]) input[type=file].absolute { position: absolute; width: 100%; height: 100%; inset: 0; min-height: 0; }
/* Nested full-width engine shells should not add a second padded white card. */
.td-page #tool-app-workspace > :is(.card,.tool-app-card,.toolspark-card) { border: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
@media (max-width: 700px) {
    .td-page .tool-app [style*="grid-template-columns"]:has(textarea) { grid-template-columns: minmax(0,1fr) !important; }
    /* Flex-fill tabs must wrap as readable items rather than one-letter columns. */
    .td-page .tool-app button.flex-1 { flex: 1 1 140px !important; }
    .td-page .tool-app .flex:has(> button.flex-1) { flex-wrap: wrap !important; }
    .td-page .tool-app :is(.grid-cols-2,.grid-cols-3,.grid-cols-4):has(> div > input, > div > select, > div > label, > label) { grid-template-columns: minmax(0,1fr) !important; }
    .td-page .tool-app :is(.p-5,.p-6,.p-8) { padding: 18px !important; }
    .td-page .tool-app .flex:has(> h2,> h3,> h4) { flex-wrap: wrap !important; gap: 12px; }
    .td-page .tool-app label { overflow-wrap: normal; }
    .td-page .tool-app .card-body { padding: 18px; }
    .td-page .tool-app :is(.tool-dropzone,.upload-dropzone,.drop-zone,[id$="-dropzone"]) { padding: 28px 16px !important; }
    .td-page .tool-app :is(.nav-pills,.nav-tabs) { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .td-page .tool-app * { transition: none !important; } }

.td-page .tool-app [class*="-hero"] { text-shadow: none !important; }

/* Generated custom engine card surfaces. */
.td-page .tool-app :is(
    .aeg-card,
    .age-calc-form-card,
    .age-kpi-card,
    .age-progress-card,
    .age-result-hero,
    .age-units-table-card,
    .aibi-card,
    .aila-persona-card,
    .angle-unit-card,
    .area-unit-card,
    .base-table-card,
    .base-unit-card,
    .bep-card,
    .bep-formula-card,
    .bep-history-card,
    .bep-input-card,
    .bep-results-card,
    .bintext-matrix-card,
    .bits-table-card,
    .bits-unit-card,
    .botg-section-card,
    .brick-block-card,
    .brick-block-form-card,
    .brick-block-header-card,
    .brick-block-hero,
    .brick-block-svg-card,
    .bytes-unit-card,
    .cac-benchmark-card,
    .cac-card,
    .cac-history-card,
    .cac-kpi-card,
    .cac-results-card,
    .calc-header-card,
    .calculator-card,
    .cmu-wall-card,
    .cmu-wall-diagram-card,
    .cmu-wall-form-card,
    .cmu-wall-header-card,
    .cmu-wall-hero,
    .code-output-card,
    .concrete-card,
    .concrete-column-card,
    .concrete-column-form-card,
    .concrete-column-header-card,
    .concrete-column-hero,
    .concrete-column-svg-card,
    .concrete-form-card,
    .concrete-header-card,
    .concrete-hero,
    .concrete-steps-card,
    .concrete-steps-form-card,
    .concrete-steps-header-card,
    .concrete-steps-hero,
    .concrete-steps-svg-card,
    .concrete-svg-card,
    .ctr-output-card,
    .density-unit-card,
    .disc-card,
    .disc-formula-card,
    .disc-history-card,
    .disc-input-card,
    .disc-results-card,
    .ebitda-benchmark-card,
    .ebitda-card,
    .ebitda-history-card,
    .ebitda-kpi-card,
    .ebitda-results-card,
    .elec-audit-summary-panel,
    .elec-form-card,
    .elec-hero,
    .elec-settings-card,
    .elec-table-card,
    .energy-unit-card,
    .force-unit-card,
    .fuel-card,
    .fuel-header-card,
    .fuel-hero-card,
    .fuel-results-hero,
    .fuel-unit-card,
    .g2n-card,
    .g2n-formula-card,
    .g2n-history-card,
    .g2n-input-card,
    .g2n-results-card,
    .gpa-cum-card,
    .gpa-hero,
    .gpa-table-card,
    .grade-hero,
    .grade-table-card,
    .grade-target-card,
    .handle-card,
    .hexstr-matrix-card,
    .hth-output-card,
    .input-mode-panel,
    .length-unit-card,
    .ltv-benchmark-card,
    .ltv-card,
    .ltv-history-card,
    .ltv-kpi-card,
    .ltv-results-card,
    .mag-item-card,
    .matrix-box-card,
    .matrix-results-card,
    .matrix-steps-card,
    .matrix-tape-card,
    .mkup-card,
    .mkup-formula-card,
    .mkup-history-card,
    .mkup-input-card,
    .mkup-results-card,
    .mmm-card,
    .mmm-header-card,
    .mmm-hero-card,
    .mmm-results-hero,
    .moe-card,
    .moe-header-card,
    .moe-hero-card,
    .moe-results-hero,
    .mortar-masonry-card,
    .mortar-masonry-form-card,
    .mortar-masonry-header-card,
    .mortar-masonry-hero,
    .mortar-masonry-svg-card,
    .name-card,
    .nato-card,
    .pace-card,
    .pace-header-card,
    .pace-hero-card,
    .pace-results-hero,
    .pdd-method-panel,
    .png-item-card,
    .power-unit-card,
    .pressure-unit-card,
    .prob-card,
    .prob-header-card,
    .prob-hero-card,
    .prob-results-hero,
    .profit-card,
    .profit-formula-card,
    .profit-history-card,
    .profit-input-card,
    .profit-results-card,
    .ratio-card,
    .ratio-header-card,
    .ratio-hero-card,
    .ratio-results-hero,
    .rebar-breakdown-card,
    .rebar-diagram-card,
    .rebar-header-card,
    .rebar-hero-card,
    .rebar-history-card,
    .rebar-input-panel,
    .rebar-results-panel,
    .rth-output-card,
    .section-card,
    .speed-unit-card,
    .ssize-card,
    .ssize-header-card,
    .ssize-hero-card,
    .ssize-results-hero,
    .stat-card,
    .stat-header-card,
    .stat-hero-card,
    .stat-results-hero,
    .stax-card,
    .stax-formula-card,
    .stax-history-card,
    .stax-input-card,
    .stax-results-card,
    .story-blueprint-card,
    .temp-unit-card,
    .time-table-card,
    .time-unit-card,
    .timesheet-hero,
    .timesheet-settings-card,
    .timesheet-table-card,
    .tip-res-hero-card,
    .tip-res-mini-card,
    .tip-results-panel,
    .title-card,
    .tool-app-card,
    .tool-bmi-form-card,
    .tool-bmi-result-card,
    .tool-png-controls-card,
    .tool-preview-card,
    .toolspark-card,
    .torque-unit-card,
    .vat-card,
    .vat-formula-card,
    .vat-history-card,
    .vat-input-card,
    .vat-results-card,
    .vo2-panel,
    .volume-unit-card,
    .vsg-scene-card,
    .wc-limit-card,
    .webp-item-card,
    .weight-unit-card
) {
    border: 1px solid #dfe5ee !important; border-radius: 12px !important;
    background: #fff !important; color: #334155 !important; box-shadow: none !important;
}
.td-page .tool-app :is(.age-kpi-card,.age-result-hero,.bep-formula-card,.bep-results-card,.brick-block-hero,.cac-benchmark-card,.cac-kpi-card,.cac-results-card,.cmu-wall-hero,.concrete-column-hero,.concrete-hero,.concrete-steps-hero,.disc-formula-card,.disc-results-card,.ebitda-benchmark-card,.ebitda-kpi-card,.ebitda-results-card,.elec-hero,.fuel-hero-card,.fuel-results-hero,.g2n-formula-card,.g2n-results-card,.gpa-hero,.grade-hero,.ltv-benchmark-card,.ltv-kpi-card,.ltv-results-card,.matrix-results-card,.mkup-formula-card,.mkup-results-card,.mmm-hero-card,.mmm-results-hero,.moe-hero-card,.moe-results-hero,.mortar-masonry-hero,.pace-hero-card,.pace-results-hero,.prob-hero-card,.prob-results-hero,.profit-formula-card,.profit-results-card,.ratio-hero-card,.ratio-results-hero,.rebar-hero-card,.rebar-results-panel,.ssize-hero-card,.ssize-results-hero,.stat-hero-card,.stat-results-hero,.stax-formula-card,.stax-results-card,.timesheet-hero,.tip-res-hero-card,.tip-results-panel,.vat-formula-card,.vat-results-card) :is(p,span,div,label,strong,small):not([class*="text-success"]):not([class*="text-danger"]):not([class*="text-warning"]) { color: #475569 !important; }
.td-page .tool-app :is(.age-kpi-card,.age-result-hero,.bep-formula-card,.bep-results-card,.brick-block-hero,.cac-benchmark-card,.cac-kpi-card,.cac-results-card,.cmu-wall-hero,.concrete-column-hero,.concrete-hero,.concrete-steps-hero,.disc-formula-card,.disc-results-card,.ebitda-benchmark-card,.ebitda-kpi-card,.ebitda-results-card,.elec-hero,.fuel-hero-card,.fuel-results-hero,.g2n-formula-card,.g2n-results-card,.gpa-hero,.grade-hero,.ltv-benchmark-card,.ltv-kpi-card,.ltv-results-card,.matrix-results-card,.mkup-formula-card,.mkup-results-card,.mmm-hero-card,.mmm-results-hero,.moe-hero-card,.moe-results-hero,.mortar-masonry-hero,.pace-hero-card,.pace-results-hero,.prob-hero-card,.prob-results-hero,.profit-formula-card,.profit-results-card,.ratio-hero-card,.ratio-results-hero,.rebar-hero-card,.rebar-results-panel,.ssize-hero-card,.ssize-results-hero,.stat-hero-card,.stat-results-hero,.stax-formula-card,.stax-results-card,.timesheet-hero,.tip-res-hero-card,.tip-results-panel,.vat-formula-card,.vat-results-card) button :is(span,i) { color: inherit !important; }
