/* Depreciation recapture calculator page (pages/depreciation-calculator.html) */
.dr-container { max-width: 1160px; margin: 0 auto; padding: 0 var(--space-4, 1rem); }

.dr-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    color: #fff;
    padding: var(--space-12, 3rem) 0 var(--space-10, 2.5rem);
}
.dr-breadcrumb { font-size: 0.875rem; color: rgba(255, 255, 255, 0.8); margin-bottom: var(--space-3, 0.75rem); }
.dr-breadcrumb a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.dr-hero h1 { color: #fff; font-size: clamp(1.75rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 var(--space-4, 1rem); max-width: 22ch; }
.dr-lede { color: rgba(255, 255, 255, 0.92); font-size: 1.08rem; line-height: 1.6; max-width: 62ch; margin: 0 0 var(--space-5, 1.25rem); }
.dr-hero__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2, 0.5rem); }
.dr-hero__facts li { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; }

.dr-calc { background: var(--gray-50, #f9fafb); padding: var(--space-10, 2.5rem) 0; }
.dr-calc__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--space-8, 2rem); align-items: start; }
@media (max-width: 960px) { .dr-calc__grid { grid-template-columns: 1fr; } }

.dr-form, .dr-results { background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 14px; padding: var(--space-6, 1.5rem); box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06); }
.dr-form h2, .dr-results h2 { font-size: 1.25rem; margin: 0 0 var(--space-4, 1rem); color: var(--gray-900, #111827); }
.dr-form fieldset { border: 0; margin: 0 0 var(--space-5, 1.25rem); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4, 1rem); }
.dr-form legend { grid-column: 1 / -1; font-weight: 600; color: var(--primary-dark, #1d4ed8); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: var(--space-3, 0.75rem); padding: 0; }
@media (max-width: 560px) { .dr-form fieldset { grid-template-columns: 1fr; } }
.dr-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.dr-field--wide { grid-column: 1 / -1; }
.dr-field label { font-weight: 600; font-size: 0.92rem; color: var(--gray-800, #1f2937); }
.dr-field small { color: var(--gray-500, #6b7280); font-size: 0.8rem; line-height: 1.4; }
.dr-input { position: relative; display: flex; align-items: center; }
.dr-input span { position: absolute; left: 0.75rem; color: var(--gray-500, #6b7280); pointer-events: none; font-size: 0.95rem; }
.dr-input span.dr-suffix { left: auto; right: 0.75rem; }
.dr-field input[type="text"], .dr-field input[type="number"], .dr-field input[type="month"], .dr-field select {
    width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: var(--gray-900, #111827);
    border: 1px solid var(--gray-300, #d1d5db); border-radius: 8px; padding: 0.6rem 0.75rem; background: #fff; min-height: 44px;
}
.dr-input input { padding-left: 1.6rem !important; }
.dr-input--pct input { padding-left: 0.75rem !important; padding-right: 1.8rem !important; }
.dr-field input:focus, .dr-field select:focus { outline: none; border-color: var(--primary-color, #2563eb); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.dr-check { flex-direction: row; align-items: flex-start; gap: 0.6rem; }
.dr-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--primary-color, #2563eb); }
.dr-btn { width: 100%; border: 0; border-radius: 10px; background: var(--primary-color, #2563eb); color: #fff; font: inherit; font-weight: 600; font-size: 1rem; padding: 0.85rem 1rem; cursor: pointer; min-height: 48px; }
.dr-btn:hover { background: var(--primary-dark, #1d4ed8); }

.dr-results { position: sticky; top: 90px; }
@media (max-width: 960px) { .dr-results { position: static; } }
.dr-results--stale .dr-lines, .dr-results--stale .dr-details { opacity: 0.45; }
.dr-errors { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: var(--space-4, 1rem); font-size: 0.9rem; }
.dr-errors p { margin: 0 0 0.25rem; }
.dr-errors ul { margin: 0; padding-left: 1.1rem; }
.dr-lines { list-style: none; margin: 0 0 var(--space-4, 1rem); padding: 0; display: grid; gap: var(--space-3, 0.75rem); }
.dr-line { border: 1px solid var(--gray-200, #e5e7eb); border-radius: 10px; padding: 0.85rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; align-items: baseline; }
.dr-line__label { font-weight: 600; color: var(--gray-800, #1f2937); display: flex; align-items: center; gap: 0.5rem; }
.dr-line__num { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #dbeafe; color: var(--primary-dark, #1d4ed8); font-size: 0.8rem; font-weight: 700; }
.dr-line__amount { font-size: 1.35rem; font-weight: 700; color: var(--gray-900, #111827); text-align: right; font-variant-numeric: tabular-nums; }
.dr-line__note { color: var(--gray-600, #4b5563); font-size: 0.85rem; }
.dr-line__tax { color: var(--gray-700, #374151); font-size: 0.9rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dr-line--total { background: #eff6ff; border-color: #bfdbfe; }
.dr-line--total .dr-line__amount { color: var(--primary-dark, #1d4ed8); font-size: 1.6rem; }
.dr-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 0.88rem; margin: 0 0 var(--space-4, 1rem); }
.dr-details { margin: 0 0 var(--space-4, 1rem); display: grid; gap: 0.1rem; }
.dr-details div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--gray-200, #e5e7eb); font-size: 0.9rem; }
.dr-details dt { color: var(--gray-600, #4b5563); }
.dr-details dd { margin: 0; font-weight: 600; color: var(--gray-900, #111827); text-align: right; font-variant-numeric: tabular-nums; }
.dr-schedule summary { cursor: pointer; font-weight: 600; color: var(--primary-dark, #1d4ed8); padding: 0.4rem 0; }
.dr-fineprint { color: var(--gray-500, #6b7280); font-size: 0.8rem; line-height: 1.5; margin: var(--space-3, 0.75rem) 0 0; }

.dr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--space-4, 1rem) 0 var(--space-6, 1.5rem); }
.dr-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.dr-table caption { text-align: left; font-weight: 600; color: var(--gray-800, #1f2937); padding: 0 0 0.5rem; }
.dr-table th, .dr-table td { border-bottom: 1px solid var(--gray-200, #e5e7eb); padding: 0.55rem 0.7rem; text-align: right; white-space: nowrap; }
.dr-table th:first-child, .dr-table td:first-child { text-align: left; }
.dr-table thead th { background: var(--gray-50, #f9fafb); color: var(--gray-700, #374151); font-weight: 600; }
.dr-table tfoot td { font-weight: 700; }

.dr-article { background: #fff; padding: var(--space-12, 3rem) 0; }
.dr-article .dr-container { max-width: 860px; }
.dr-article h2 { font-size: 1.6rem; margin: var(--space-10, 2.5rem) 0 var(--space-4, 1rem); color: var(--gray-900, #111827); }
.dr-article h2:first-child { margin-top: 0; }
.dr-article h3 { font-size: 1.15rem; margin: var(--space-6, 1.5rem) 0 var(--space-3, 0.75rem); color: var(--gray-900, #111827); }
.dr-article p, .dr-article li { font-size: 1.02rem; line-height: 1.7; color: var(--gray-700, #374151); }
.dr-article ol.dr-steps { padding-left: 1.3rem; }
.dr-article ol.dr-steps li { margin-bottom: 0.6rem; }
.dr-callout { background: #eff6ff; border-left: 4px solid var(--primary-color, #2563eb); border-radius: 8px; padding: var(--space-4, 1rem) var(--space-5, 1.25rem); margin: var(--space-5, 1.25rem) 0; }
.dr-callout p:last-child { margin-bottom: 0; }

.dr-faq { margin-top: var(--space-4, 1rem); }
.dr-faq details { border: 1px solid var(--gray-200, #e5e7eb); border-radius: 10px; padding: 0 var(--space-5, 1.25rem); margin-bottom: var(--space-3, 0.75rem); background: #fff; }
.dr-faq summary { cursor: pointer; font-weight: 600; color: var(--gray-900, #111827); padding: var(--space-4, 1rem) 0; list-style-position: outside; }
.dr-faq details[open] summary { border-bottom: 1px solid var(--gray-100, #f3f4f6); }
.dr-faq .dr-faq__a { padding: var(--space-3, 0.75rem) 0 var(--space-4, 1rem); }
.dr-faq .dr-faq__a p:last-child { margin-bottom: 0; }
.dr-sources { font-size: 0.92rem; }
.dr-sources li { margin-bottom: 0.35rem; }
