#js-tool-container-profiled-timber-calculator { --ptc-timber: #6f7f4a; --ptc-timber-soft: rgba(111,127,74,.14); --ptc-loss: #a2683a; --ptc-insul: #8a8f98; --ptc-stack-h: 196px; }
html[data-theme="dark"] #js-tool-container-profiled-timber-calculator { --ptc-timber: #a8bb74; --ptc-timber-soft: rgba(168,187,116,.16); --ptc-loss: #d18d54; --ptc-insul: #9aa0aa; }
#js-tool-container-profiled-timber-calculator .tb-zone { display: flex; flex-direction: column; gap: 14px; }
#js-tool-container-profiled-timber-calculator .tb-prf-fieldset { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 16px 16px; margin: 0; }
#js-tool-container-profiled-timber-calculator .tb-prf-fieldset + .tb-prf-fieldset { margin-top: 14px; }
#js-tool-container-profiled-timber-calculator .tb-prf-legend { padding: 0 6px; font-size: 0.92rem; font-weight: 600; color: var(--text-secondary); }
#js-tool-container-profiled-timber-calculator .tb-prf-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px 20px; }
#js-tool-container-profiled-timber-calculator .tb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#js-tool-container-profiled-timber-calculator .tb-field label { font-size: 0.92rem; font-weight: 500; color: var(--text-primary); }
#js-tool-container-profiled-timber-calculator .tb-field input, #js-tool-container-profiled-timber-calculator .tb-field select { height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-secondary); color: var(--text-primary); font-size: 16px; width: 100%; font-variant-numeric: tabular-nums; }
#js-tool-container-profiled-timber-calculator .tb-field input:focus, #js-tool-container-profiled-timber-calculator .tb-field select:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-light); }
#js-tool-container-profiled-timber-calculator .tb-hint { font-size: 0.82rem; line-height: 1.35; color: var(--text-muted); }
#js-tool-container-profiled-timber-calculator .tb-hero { border: 1px solid var(--border-color); border-left: 4px solid var(--ptc-timber); border-radius: var(--radius-md); background: var(--ptc-timber-soft); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-height: 128px; }
#js-tool-container-profiled-timber-calculator .tb-hero-label { font-size: 0.88rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
#js-tool-container-profiled-timber-calculator .tb-hero-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#js-tool-container-profiled-timber-calculator .tb-hero-value { font-size: clamp(2.1rem, 5.4vw, 3.1rem); font-weight: 700; line-height: 1.04; font-variant-numeric: tabular-nums; color: var(--text-primary); }
#js-tool-container-profiled-timber-calculator .tb-unit { font-size: 1.05rem; color: var(--text-secondary); }
#js-tool-container-profiled-timber-calculator .tb-prf-hero-alt { font-size: 0.95rem; color: var(--text-secondary); border-left: 1px solid var(--border-color); padding-left: 10px; font-variant-numeric: tabular-nums; }
#js-tool-container-profiled-timber-calculator .tb-hero-note { margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--text-secondary); }
#js-tool-container-profiled-timber-calculator .tb-prf-status { border: 1px solid var(--border-color); border-left: 4px solid var(--accent-primary); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.88rem; color: var(--text-secondary); }
#js-tool-container-profiled-timber-calculator .tb-prf-status.ptc-warn { border-left-color: var(--warning); background: var(--warning-light); color: var(--text-primary); }
#js-tool-container-profiled-timber-calculator .tb-prf-status.ptc-danger { border-left-color: var(--danger); background: var(--danger-light); color: var(--text-primary); }
#js-tool-container-profiled-timber-calculator .tb-prf-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 16px; }
#js-tool-container-profiled-timber-calculator .tb-prf-stack-title, #js-tool-container-profiled-timber-calculator .tb-prf-stack-rows { grid-column: 1 / -1; }
#js-tool-container-profiled-timber-calculator .tb-prf-stack-title { display: block; font-size: 0.88rem; font-weight: 650; color: var(--text-primary); }
#js-tool-container-profiled-timber-calculator .tb-prf-stack-rows { display: flex; flex-direction: column; gap: 2px; height: var(--ptc-stack-h); }
#js-tool-container-profiled-timber-calculator .ptc-crown { display: flex; flex: 1 1 0; min-height: 3px; width: 100%; border-radius: 2px; overflow: hidden; }
#js-tool-container-profiled-timber-calculator .ptc-crown-work { display: block; height: 100%; width: 93%; background: var(--ptc-timber); }
#js-tool-container-profiled-timber-calculator .ptc-crown-loss { display: block; height: 100%; width: 7%; background: var(--ptc-loss); }
#js-tool-container-profiled-timber-calculator .ptc-crown.ptc-crown-even .ptc-crown-work { opacity: 0.72; }
#js-tool-container-profiled-timber-calculator .tb-prf-mark { display: block; font-size: 0.82rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
#js-tool-container-profiled-timber-calculator .tb-prf-spec-note { margin: 12px 2px 0; font-size: 0.84rem; line-height: 1.45; color: var(--text-muted); }
#js-tool-container-profiled-timber-calculator .tb-ledger { display: flex; flex-direction: column; gap: 8px; }
#js-tool-container-profiled-timber-calculator .tb-ledger-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-secondary); font-size: 0.9rem; }
#js-tool-container-profiled-timber-calculator .ptc-lkey { color: var(--text-secondary); }
#js-tool-container-profiled-timber-calculator .ptc-lval { color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
#js-tool-container-profiled-timber-calculator .tb-canvas-wrap { position: relative; width: 100%; min-height: 240px; aspect-ratio: 16 / 9; border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; contain: layout; background: var(--bg-tertiary); }
#js-tool-container-profiled-timber-calculator .tb-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
#js-tool-container-profiled-timber-calculator .tb-prf-canvas-desc { margin: 0; font-size: 0.84rem; line-height: 1.45; color: var(--text-muted); }
#js-tool-container-profiled-timber-calculator .tb-prf-table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
#js-tool-container-profiled-timber-calculator .tb-prf-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; font-variant-numeric: tabular-nums; }
#js-tool-container-profiled-timber-calculator .tb-prf-table caption { text-align: left; padding: 10px 14px; font-size: 0.84rem; color: var(--text-muted); caption-side: top; }
#js-tool-container-profiled-timber-calculator .tb-prf-table th, #js-tool-container-profiled-timber-calculator .tb-prf-table td { padding: 8px 14px; text-align: right; border-top: 1px solid var(--border-color); }
#js-tool-container-profiled-timber-calculator .tb-prf-table th { color: var(--text-secondary); font-weight: 600; white-space: nowrap; }
#js-tool-container-profiled-timber-calculator .tb-prf-table th:first-child, #js-tool-container-profiled-timber-calculator .tb-prf-table td:first-child { text-align: left; }
#js-tool-container-profiled-timber-calculator .tb-prf-table td:last-child { text-align: left; color: var(--text-muted); font-variant-numeric: normal; min-width: 15em; }
#js-tool-container-profiled-timber-calculator .tb-prf-empty { padding: 12px 14px; font-size: 0.87rem; color: var(--text-muted); border: 1px dashed var(--border-color); border-radius: var(--radius-sm); }
@media (max-width: 900px) {
#js-tool-container-profiled-timber-calculator .tb-prf-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
#js-tool-container-profiled-timber-calculator .tb-prf-grid { grid-template-columns: 1fr; }
#js-tool-container-profiled-timber-calculator .tb-hero { padding: 16px; }
#js-tool-container-profiled-timber-calculator .tb-ledger-row { flex-wrap: wrap; }
#js-tool-container-profiled-timber-calculator .tb-canvas-wrap { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
#js-tool-container-profiled-timber-calculator .ptc-crown-work, #js-tool-container-profiled-timber-calculator .ptc-crown-loss { transition: none; }
}