/* Scoped additions to the existing cream, ink and gold free-tool shell. */
[data-pgt-rabbetdepth] .pgt-tool-rd { text-align: left; max-width: 900px; margin-inline: auto; }
[data-pgt-rabbetdepth] .pgt-tool-rd *, [data-pgt-rabbetdepth] .pgt-tool-rd *::before { box-sizing: border-box; }
[data-pgt-rabbetdepth] .pgt-badge { color: #32260a; }
.pgt-tool-rd fieldset { border: 1px solid var(--pgt-line); border-radius: 12px; padding: 18px; margin: 20px 0; min-width: 0; }
.pgt-tool-rd legend { font-weight: 600; padding: 0 8px; }
.pgt-rd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pgt-tool-rd label { display: block; font-size: 15px; font-weight: 600; }
.pgt-tool-rd input, .pgt-tool-rd select, .pgt-tool-rd textarea { display: block; width: 100%; min-height: 48px; margin-top: 7px; padding: 12px; border: 1px solid #8c8374; border-radius: 8px; background: #fff; color: #1a1a1a; font: inherit; font-size: 16px; }
.pgt-rd-hint { display: block; font-size: 13px; line-height: 1.6; color: #595247; font-weight: 400; margin-top: 7px; }
.pgt-rd-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.pgt-rd-actions button { flex: 1 1 220px; margin-top: 0; }
[data-pgt-rabbetdepth] .pgt-cta, [data-pgt-rabbetdepth] .pgt-btn:not(.pgt-btn-secondary) { background: #70550e; color: #fff; min-height: 48px; white-space: normal; }
[data-pgt-rabbetdepth] .pgt-btn-secondary { color: #443511; background: #fff8e5; border: 1px solid #8c742f; min-height: 48px; }
[data-pgt-rabbetdepth] :is(button, input, select, textarea, a, summary, section):focus-visible { outline: 3px solid #285fa6; outline-offset: 4px; }
.pgt-tool-rd [aria-invalid="true"] { border: 2px solid #a32525; }
.pgt-tool-rd [hidden] { display: none !important; }
.pgt-tool-rd button:disabled { opacity: 0.55; cursor: not-allowed; }
.pgt-tool-rd .pgt-status { min-height: 3.4em; color: #443511; }
#pgtRdResult:not(:empty) { margin: 20px 0; padding: 22px; background: #fffaf0; border: 1px solid var(--pgt-line); border-radius: 14px; }
.pgt-rd-diagram { display: block; width: 100%; max-width: 360px; height: auto; margin: 6px auto; }
.pgt-rd-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pgt-rd-metrics div { border: 1px solid var(--pgt-line); border-radius: 8px; padding: 12px; background: white; }
.pgt-rd-metrics dt { font-size: 13px; color: #595247; }
.pgt-rd-metrics dd { margin: 4px 0 0; font-size: 21px; font-weight: 600; overflow-wrap: anywhere; }
.pgt-tool-rd summary { cursor: pointer; min-height: 48px; padding-block: 12px; font-weight: 600; }
.pgt-rd-table { overflow-x: auto; }
.pgt-tool-rd table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pgt-tool-rd th, .pgt-tool-rd td { text-align: left; padding: 9px 5px; border-bottom: 1px solid var(--pgt-line); }
.pgt-tool-rd caption { text-align: left; font-size: 13px; margin-bottom: 8px; }
#pgtRdCopyFallback { min-height: 220px; }
@media (max-width: 540px) {
  .pgt-rd-grid { grid-template-columns: 1fr; }
  .pgt-tool-rd fieldset { padding: 12px; }
  #pgtRdResult:not(:empty) { padding: 12px; }
  .pgt-rd-metrics dd { font-size: 18px; }
  .pgt-rd-actions button { width: 100%; }
  [data-pgt-rabbetdepth] .pgt-hero { padding-top: 34px; }
}

.pgt-rd-swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid #655b4b; margin-right: 8px; }
.pgt-rd-warning { border-left: 4px solid #8c5616; padding-left: 12px; }
.pgt-tool-rd .pgt-rd-grid { margin-top: 16px; }
