/**
 * TPDG Rate Calculator — public stylesheet
 *
 * Brand tokens:
 *   navy   #0F2A44   primary
 *   gold   #B08D3F   accent / CTA
 *   warm   #FBF7EE   page bg
 *   cream  #F0EBDC   card bg
 *   stone  #5C5A55   secondary text
 *   red    #8B2E2E   errors
 *
 * Mobile-first. Breakpoint at 720px for two-column layouts.
 *
 * Scoped under .tpdg-rc-form-wrap and .tpdg-rc-result so it cannot
 * collide with theme styles.
 */

/* =============================================================
   FORM
   ============================================================= */

.tpdg-rc-form-wrap {
    --rc-navy: #0F2A44;
    --rc-gold: #B08D3F;
    --rc-warm: #FBF7EE;
    --rc-cream: #F0EBDC;
    --rc-stone: #5C5A55;
    --rc-red: #8B2E2E;
    --rc-green: #2D5A3D;
    --rc-border: #E5DDC9;

    max-width: 880px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    color: var(--rc-navy);
    font-family: 'Manrope', Calibri, Arial, sans-serif;
    line-height: 1.5;
}

.tpdg-rc-form__header {
    margin-bottom: 32px;
}

.tpdg-rc-form__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--rc-navy);
    margin: 0 0 12px;
    line-height: 1.2;
}

.tpdg-rc-form__lede {
    font-size: 17px;
    color: var(--rc-stone);
    margin: 0;
    max-width: 640px;
}

.tpdg-rc-step {
    background: #fff;
    border: 1px solid var(--rc-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(15, 42, 68, 0.04);
}

.tpdg-rc-step__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--rc-navy);
}

.tpdg-rc-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--rc-gold);
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Manrope', Arial, sans-serif;
}

.tpdg-rc-step__hint {
    color: var(--rc-stone);
    font-size: 15px;
    margin: 0 0 20px;
}

/* PRESETS */

.tpdg-rc-presets {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .tpdg-rc-presets {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tpdg-rc-preset-card {
    display: block;
    cursor: pointer;
}

.tpdg-rc-preset-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tpdg-rc-preset-card__inner {
    display: block;
    padding: 16px 20px;
    background: var(--rc-cream);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s;
}

.tpdg-rc-preset-card:hover .tpdg-rc-preset-card__inner {
    background: #EAE3CD;
}

.tpdg-rc-preset-card.is-selected .tpdg-rc-preset-card__inner,
.tpdg-rc-preset-card input:checked + .tpdg-rc-preset-card__inner {
    border-color: var(--rc-gold);
    background: #fff;
}

.tpdg-rc-preset-card input:focus + .tpdg-rc-preset-card__inner {
    outline: 2px solid var(--rc-navy);
    outline-offset: 2px;
}

.tpdg-rc-preset-card__title {
    display: block;
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
}

.tpdg-rc-preset-card__desc {
    display: block;
    font-size: 14px;
    color: var(--rc-stone);
    line-height: 1.4;
}

/* GRID + FIELDS */

.tpdg-rc-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .tpdg-rc-grid--2 {
        grid-template-columns: 1fr 1fr;
    }
}

.tpdg-rc-field--full {
    grid-column: 1 / -1;
}

.tpdg-rc-field label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--rc-navy);
    margin-bottom: 6px;
}

.tpdg-rc-required {
    color: var(--rc-red);
    margin-left: 2px;
}

.tpdg-rc-field input[type="text"],
.tpdg-rc-field input[type="email"],
.tpdg-rc-field input[type="tel"],
.tpdg-rc-field input[type="number"],
.tpdg-rc-field input[type="url"],
.tpdg-rc-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rc-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    color: var(--rc-navy);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    box-sizing: border-box;
}

.tpdg-rc-field input:focus,
.tpdg-rc-field textarea:focus {
    outline: none;
    border-color: var(--rc-gold);
    box-shadow: 0 0 0 3px rgba(176, 141, 63, 0.2);
}

.tpdg-rc-field__hint {
    color: var(--rc-stone);
    font-size: 13px;
    margin: 6px 0 0;
}

.tpdg-rc-field input[type="number"]::-webkit-outer-spin-button,
.tpdg-rc-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* INPUT WITH PREFIX/SUFFIX (currency $, percent %) */

.tpdg-rc-input-prefix,
.tpdg-rc-input-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.tpdg-rc-input-prefix > span:first-child,
.tpdg-rc-input-suffix > span:last-child {
    position: absolute;
    color: var(--rc-stone);
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

.tpdg-rc-input-prefix > span:first-child {
    left: 14px;
}

.tpdg-rc-input-suffix > span:last-child {
    right: 14px;
}

.tpdg-rc-input-prefix input {
    padding-left: 28px !important;
}

.tpdg-rc-input-suffix input {
    padding-right: 28px !important;
}

/* EXPENSES */

.tpdg-rc-expenses {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tpdg-rc-expense-cat {
    background: var(--rc-cream);
    border-radius: 8px;
    overflow: hidden;
}

.tpdg-rc-expense-cat__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

.tpdg-rc-expense-cat__head::-webkit-details-marker {
    display: none;
}

.tpdg-rc-expense-cat__head::before {
    content: "\25B8"; /* small triangle */
    color: var(--rc-stone);
    margin-right: 8px;
    transition: transform 0.15s;
}

.tpdg-rc-expense-cat[open] .tpdg-rc-expense-cat__head::before {
    transform: rotate(90deg);
}

.tpdg-rc-expense-cat__name {
    flex: 1;
    color: var(--rc-navy);
}

.tpdg-rc-expense-cat__total {
    font-variant-numeric: tabular-nums;
    color: var(--rc-stone);
    font-size: 15px;
}

.tpdg-rc-expense-cat__body {
    padding: 0 18px 16px;
    background: #fff;
    border-top: 1px solid var(--rc-border);
}

.tpdg-rc-expense-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #F5F2EB;
    align-items: center;
}

.tpdg-rc-expense-row:last-child {
    border-bottom: none;
}

.tpdg-rc-expense-row__label {
    font-size: 15px;
    color: var(--rc-navy);
    line-height: 1.3;
}

.tpdg-rc-expense-row__note {
    display: block;
    font-size: 12px;
    color: var(--rc-stone);
    margin-top: 2px;
    font-weight: normal;
}

.tpdg-rc-expense-row__input {
    position: relative;
    display: flex;
    align-items: center;
}

.tpdg-rc-expense-row__input > span:first-child {
    position: absolute;
    left: 12px;
    color: var(--rc-stone);
    pointer-events: none;
    font-weight: 600;
}

.tpdg-rc-expense-row__input input {
    width: 100%;
    padding: 10px 38px 10px 26px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    font-size: 15px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.tpdg-rc-expense-row__input input:focus {
    outline: none;
    border-color: var(--rc-gold);
    box-shadow: 0 0 0 2px rgba(176, 141, 63, 0.2);
}

.tpdg-rc-expense-row__unit {
    position: absolute;
    right: 12px;
    color: var(--rc-stone);
    font-size: 13px;
    pointer-events: none;
}

.tpdg-rc-expense-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 16px 20px;
    background: var(--rc-navy);
    color: #fff;
    border-radius: 8px;
}

.tpdg-rc-expense-summary__label {
    font-weight: 600;
}

.tpdg-rc-expense-summary__value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

/* CONSENT */

.tpdg-rc-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--rc-warm);
    border-radius: 8px;
    font-weight: normal !important;
    color: var(--rc-stone);
    font-size: 14px;
}

.tpdg-rc-consent__label input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--rc-gold);
}

.tpdg-rc-consent__label a {
    color: var(--rc-navy);
    text-decoration: underline;
}

/* SUBMIT */

.tpdg-rc-submit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
    justify-content: space-between;
}

.tpdg-rc-submit {
    background: var(--rc-navy);
    color: #fff;
    border: none;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    letter-spacing: 0.3px;
    transition: background 0.15s, transform 0.05s;
    min-height: 44px;
}

.tpdg-rc-submit:hover {
    background: #1A3A5C;
}

.tpdg-rc-submit:active {
    transform: translateY(1px);
}

.tpdg-rc-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tpdg-rc-save-draft {
    background: transparent;
    color: var(--rc-navy);
    border: 1px solid var(--rc-border);
    padding: 12px 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
}

.tpdg-rc-save-draft:hover {
    background: var(--rc-cream);
}

.tpdg-rc-feedback {
    margin-top: 16px;
    padding: 0;
    font-size: 15px;
}

.tpdg-rc-feedback.is-error {
    padding: 12px 16px;
    background: #FBE9E9;
    border-left: 4px solid var(--rc-red);
    color: var(--rc-red);
    border-radius: 4px;
}

.tpdg-rc-feedback.is-success {
    padding: 12px 16px;
    background: #E8F2EC;
    border-left: 4px solid var(--rc-green);
    color: var(--rc-green);
    border-radius: 4px;
}

/* =============================================================
   RESULT PAGE
   ============================================================= */

.tpdg-rc-result {
    --rc-navy: #0F2A44;
    --rc-gold: #B08D3F;
    --rc-warm: #FBF7EE;
    --rc-cream: #F0EBDC;
    --rc-stone: #5C5A55;
    --rc-red: #8B2E2E;
    --rc-green: #2D5A3D;
    --rc-border: #E5DDC9;

    max-width: 920px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    color: var(--rc-navy);
    font-family: 'Manrope', Calibri, Arial, sans-serif;
    line-height: 1.5;
}

.tpdg-rc-result__header {
    margin-bottom: 32px;
    text-align: center;
}

.tpdg-rc-result__greet {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    color: var(--rc-gold);
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}

.tpdg-rc-result__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--rc-navy);
    margin: 0 0 12px;
    line-height: 1.15;
}

.tpdg-rc-result__sub {
    color: var(--rc-stone);
    margin: 0;
}

/* Three rates grid */

.tpdg-rc-rates-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    margin-bottom: 32px;
}

@media (min-width: 720px) {
    .tpdg-rc-rates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tpdg-rc-rate {
    background: #fff;
    border: 1px solid var(--rc-border);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    text-align: center;
}

.tpdg-rc-rate--target {
    background: var(--rc-navy);
    color: #fff;
    border-color: var(--rc-navy);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(15, 42, 68, 0.15);
}

.tpdg-rc-rate__pin {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rc-gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tpdg-rc-rate h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    margin: 0 0 12px;
    font-weight: 600;
}

.tpdg-rc-rate__amount {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px;
    font-variant-numeric: tabular-nums;
}

.tpdg-rc-rate--target .tpdg-rc-rate__amount {
    color: #fff;
}

.tpdg-rc-rate__note {
    font-size: 13px;
    color: var(--rc-stone);
    margin: 0;
    line-height: 1.4;
}

.tpdg-rc-rate--target .tpdg-rc-rate__note {
    color: rgba(255, 255, 255, 0.85);
}

/* Annual revenue line */

.tpdg-rc-annual {
    background: var(--rc-cream);
    border-left: 4px solid var(--rc-gold);
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.tpdg-rc-annual__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--rc-navy);
    line-height: 1.25;
}

.tpdg-rc-annual__line {
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
}

/* Cost bars */

.tpdg-rc-section {
    background: #fff;
    border: 1px solid var(--rc-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.tpdg-rc-section__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--rc-navy);
    line-height: 1.25;
}

.tpdg-rc-section__lede {
    color: var(--rc-stone);
    margin: 0 0 20px;
    font-size: 15px;
}

.tpdg-rc-costs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tpdg-rc-cost-bar {
    position: relative;
}

.tpdg-rc-cost-bar__head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
}

.tpdg-rc-cost-bar__meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-shrink: 0;
}

.tpdg-rc-cost-bar__amount {
    color: var(--rc-stone);
    font-variant-numeric: tabular-nums;
}

.tpdg-rc-cost-bar__track {
    height: 10px;
    background: var(--rc-cream);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.tpdg-rc-cost-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rc-gold), #C9A658);
    border-radius: 5px;
    transition: width 0.6s ease;
}

.tpdg-rc-cost-bar__pct {
    font-size: 13px;
    color: var(--rc-gold);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
}

/* Benchmark */

.tpdg-rc-benchmark__lead {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 24px;
}

.tpdg-rc-benchmark--above .tpdg-rc-benchmark__lead { color: var(--rc-green); }
.tpdg-rc-benchmark--below .tpdg-rc-benchmark__lead { color: var(--rc-red); }

.tpdg-rc-benchmark__scale {
    margin-top: 16px;
}

.tpdg-rc-benchmark__track {
    position: relative;
    height: 50px;
    background: var(--rc-cream);
    border-radius: 25px;
}

.tpdg-rc-benchmark__median,
.tpdg-rc-benchmark__user {
    position: absolute;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpdg-rc-benchmark__median::before {
    content: "";
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 50%;
    width: 2px;
    background: var(--rc-stone);
    transform: translateX(-50%);
}

.tpdg-rc-benchmark__user::before {
    content: "";
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rc-navy);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tpdg-rc-benchmark__median-label,
.tpdg-rc-benchmark__user-label {
    position: absolute;
    top: 100%;
    margin-top: 8px;
    font-size: 12px;
    color: var(--rc-stone);
    white-space: nowrap;
    font-weight: 600;
}

.tpdg-rc-benchmark__user-label {
    color: var(--rc-navy);
}

.tpdg-rc-benchmark__quartiles {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--rc-stone);
    margin-top: 32px;
    font-variant-numeric: tabular-nums;
}

/* Projection table */

.tpdg-rc-projection {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.tpdg-rc-projection thead th {
    background: var(--rc-navy);
    color: #fff;
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
}

.tpdg-rc-projection thead th:first-child { border-top-left-radius: 6px; }
.tpdg-rc-projection thead th:last-child  { border-top-right-radius: 6px; }

.tpdg-rc-projection tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rc-border);
}

.tpdg-rc-projection tbody tr:nth-child(even) {
    background: var(--rc-warm);
}

.tpdg-rc-projection tbody tr:last-child td {
    background: var(--rc-cream);
    font-weight: 700;
}

/* CTA */

.tpdg-rc-cta {
    background: var(--rc-navy);
    color: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-top: 32px;
}

.tpdg-rc-cta__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    margin: 0 0 12px;
    color: #fff;
}

.tpdg-rc-cta__body {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 24px;
    font-size: 16px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.tpdg-rc-cta__btn {
    display: inline-block;
    background: var(--rc-gold);
    color: #fff;
    padding: 14px 32px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    font-size: 16px;
    letter-spacing: 0.3px;
    transition: background 0.15s;
}

.tpdg-rc-cta__btn:hover {
    background: #C9A658;
    color: #fff;
}

.tpdg-rc-cta__alt {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.tpdg-rc-pdf-btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    margin-left: 8px;
    font-family: inherit;
}

.tpdg-rc-pdf-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* v2.2.9 — Excel button is an anchor (link to admin-post handler), so reset
   anchor defaults to match the button variant. */
a.tpdg-rc-pdf-btn,
a.tpdg-rc-pdf-btn:hover,
a.tpdg-rc-pdf-btn:visited {
    text-decoration: none;
    color: #fff;
    display: inline-block;
}

/* v2.3.0 — Primary PDF button (Dompdf-rendered branded report).
   Filled style so it visually leads ahead of Print view and Excel. */
.tpdg-rc-pdf-btn--primary {
    background: #B08D3F !important;
    border-color: #B08D3F !important;
    color: #fff !important;
    font-weight: 600;
}
.tpdg-rc-pdf-btn--primary:hover {
    background: #9b7a32 !important;
    border-color: #9b7a32 !important;
}

/* v2.2.6 — hint shown next to the PDF button in the CTA panel */
.tpdg-rc-pdf-hint {
    display: block;
    margin-top: 6px;
    margin-left: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-style: italic;
}

/* ============================================================
   Print stylesheet (v2.2.6)
   When the user prints the result page, hide the non-essential
   interactive UI and show only the print-view content with a
   clean A4-friendly layout. window.print() in calculator.js
   triggers this.
   ============================================================ */
@media print {
    /* Hide WordPress chrome, site nav, admin bar, footer */
    body > header,
    body > nav,
    body > footer,
    #wpadminbar,
    .site-header,
    .site-footer,
    .tpdg-rc-cta,
    .tpdg-rc-cta__alt,
    .tpdg-rc-pdf-btn,
    .tpdg-rc-pdf-hint {
        display: none !important;
    }

    /* Show only the print-view section */
    body, html {
        background: #fff !important;
        color: #000 !important;
    }

    .tpdg-rc-print {
        display: block !important;
    }

    /* Prevent awkward page breaks inside tables and section blocks */
    .tpdg-rc-print__section,
    .tpdg-rc-print__rates,
    table {
        page-break-inside: avoid;
    }

    /* Suppress the live chart canvas — print-view has its own static layout */
    .tpdg-rc-chart-wrap,
    canvas {
        display: none !important;
    }
}

/* DASHBOARD */

.tpdg-rc-dashboard {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 16px;
    color: #0F2A44;
}

.tpdg-rc-dashboard__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    margin: 0 0 24px;
}

.tpdg-rc-dashboard__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #E5DDC9;
    border-radius: 8px;
    overflow: hidden;
}

.tpdg-rc-dashboard__table thead th {
    background: #F0EBDC;
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #5C5A55;
}

.tpdg-rc-dashboard__table tbody td {
    padding: 14px 16px;
    border-top: 1px solid #F5F2EB;
}

.tpdg-rc-dashboard__view {
    color: #0F2A44;
    text-decoration: none;
    font-weight: 600;
}

.tpdg-rc-dashboard__btn {
    display: inline-block;
    background: #0F2A44;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 24px;
}

/* PRINT VIEW (also used for PDF generation) */

.tpdg-rc-print {
    background: #fff;
    color: #0F2A44;
    font-family: 'Calibri', Arial, sans-serif;
    padding: 20mm;
    width: 170mm;
    box-sizing: border-box;
}

.tpdg-rc-print__header {
    border-bottom: 3px solid #B08D3F;
    padding-bottom: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.tpdg-rc-print__logo {
    background: #0F2A44;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: bold;
    padding: 12px 20px;
    letter-spacing: 1px;
}

.tpdg-rc-print__title {
    font-family: Georgia, serif;
    font-size: 24px;
    margin: 0;
    color: #0F2A44;
}

.tpdg-rc-print__sub {
    margin: 4px 0 0;
    color: #5C5A55;
    font-size: 14px;
}

.tpdg-rc-print__section {
    margin-bottom: 28px;
}

.tpdg-rc-print__section h2 {
    font-family: Georgia, serif;
    font-size: 18px;
    color: #0F2A44;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E5DDC9;
}

.tpdg-rc-print__rates,
.tpdg-rc-print__inputs,
.tpdg-rc-print__costs,
.tpdg-rc-print__projection {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tpdg-rc-print__rates th,
.tpdg-rc-print__rates td,
.tpdg-rc-print__inputs th,
.tpdg-rc-print__inputs td,
.tpdg-rc-print__costs th,
.tpdg-rc-print__costs td,
.tpdg-rc-print__projection th,
.tpdg-rc-print__projection td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #E5DDC9;
}

.tpdg-rc-print__rate-target {
    background: #F0EBDC;
    font-weight: bold;
}

.tpdg-rc-print__projection thead th {
    background: #0F2A44;
    color: #fff;
    border: none;
}

.tpdg-rc-print__pagebreak {
    page-break-before: always;
}

.tpdg-rc-print__footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #E5DDC9;
    text-align: center;
    color: #5C5A55;
    font-size: 12px;
}

.tpdg-rc-print__footer p {
    margin: 4px 0;
}

/* Hide print view on screen unless we're actively rendering PDF */
.tpdg-rc-print {
    position: absolute;
    left: -9999px;
    top: 0;
}

.tpdg-rc-print.is-rendering {
    position: static;
    left: auto;
}

/* SCREEN READER ONLY */

.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================================
   PORTAL TOOLS TAB — list view
   Cards shown when entering the Tools tab in the client portal.
   Two states: active (pending invitation) and done (completed report).
   Form view uses canonical .tpdg-rc-form classes above.
   ============================================================ */

.tpdg-rc-portal__section {
    margin: 0 0 32px;
}

.tpdg-rc-portal__heading {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    color: var(--rc-navy);
    margin: 0 0 16px;
    font-weight: 700;
}

.tpdg-rc-portal__cards {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .tpdg-rc-portal__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tpdg-rc-portal__card {
    background: var(--rc-cream);
    border: 1px solid #DDD6C5;
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tpdg-rc-portal__card--active {
    border-left: 4px solid var(--rc-gold);
}

.tpdg-rc-portal__card--done {
    background: #fff;
    border-color: #E5DDC9;
}

.tpdg-rc-portal__card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 19px;
    color: var(--rc-navy);
    margin: 0;
    font-weight: 700;
}

.tpdg-rc-portal__card-meta {
    font-size: 13px;
    color: var(--rc-stone);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tpdg-rc-portal__card-time,
.tpdg-rc-portal__card-result {
    font-size: 14px;
    color: var(--rc-stone);
    margin: 4px 0 0;
}

.tpdg-rc-portal__card-result {
    color: var(--rc-navy);
    font-weight: 600;
}

.tpdg-rc-portal__note {
    background: #fff;
    border-left: 3px solid var(--rc-gold);
    padding: 12px 16px;
    margin: 8px 0;
    font-style: italic;
    color: var(--rc-navy);
    font-size: 14px;
    border-radius: 0 6px 6px 0;
}

.tpdg-rc-portal__btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.tpdg-rc-portal__btn--primary {
    background: var(--rc-navy);
    color: #fff;
}

.tpdg-rc-portal__btn--primary:hover {
    background: #1a3a5a;
    color: #fff;
}

.tpdg-rc-portal__btn--secondary {
    background: transparent;
    color: var(--rc-navy);
    border: 1px solid var(--rc-navy);
}

.tpdg-rc-portal__btn--secondary:hover {
    background: var(--rc-navy);
    color: #fff;
}

.tpdg-rc-portal__back {
    margin: 0 0 20px;
    font-size: 14px;
}

.tpdg-rc-portal__back a {
    color: var(--rc-stone);
    text-decoration: none;
}

.tpdg-rc-portal__back a:hover {
    color: var(--rc-navy);
}

/* ============================================================
   THEME DROP-CAP OPT-OUT
   The TPDG theme applies a decorative gold drop-cap to the first
   paragraph inside .post-content / .editorial-body — meant for
   blog posts and editorial pages. The client portal lives inside
   .post-content too, so without this opt-out our "Thanks, ken."
   greeting renders as "T (gap) hanks". Reset first-letter styling
   for paragraphs inside any rate-calculator UI surface.
   ============================================================ */

.tpdg-rc-result p::first-letter,
.tpdg-rc-result__header p::first-letter,
.tpdg-rc-form-wrap p::first-letter,
.tpdg-rc-portal__section p::first-letter,
.tpdg-rc-portal__card p::first-letter {
    font-family: inherit !important;
    font-style: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    float: none !important;
    margin: 0 !important;
    color: inherit !important;
}

/* ============================================================
   v2.4.0 — "OTHER: YOUR OWN COSTS" LINES
   Client-defined expense rows. The row keeps the same two-column
   grid as a standard expense row, but the left column is a text
   input the client types into rather than a fixed label.
   Rows carrying .is-extra are held back until the client clicks
   "Add another line".
   ============================================================ */

.tpdg-rc-custom__hint {
    font-size: 14px;
    color: var(--rc-stone);
    margin: 14px 0 4px;
    line-height: 1.5;
}

.tpdg-rc-expense-row--custom.is-extra {
    display: none;
}

.tpdg-rc-custom-line__label {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: var(--rc-navy);
    background: #fff;
    box-sizing: border-box;
}

.tpdg-rc-custom-line__label::placeholder {
    color: #A9A49A;
}

.tpdg-rc-custom-line__label:focus {
    outline: none;
    border-color: var(--rc-gold);
    box-shadow: 0 0 0 2px rgba(176, 141, 63, 0.2);
}

.tpdg-rc-custom-add {
    display: inline-block;
    margin-top: 14px;
    padding: 9px 16px;
    background: transparent;
    border: 1px solid var(--rc-gold);
    border-radius: 6px;
    color: var(--rc-gold);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.tpdg-rc-custom-add:hover,
.tpdg-rc-custom-add:focus {
    background: var(--rc-gold);
    color: #fff;
    outline: none;
}

/* Print: the description input should read as plain text, not a form
   field, when the client saves the page as a PDF. */
@media print {
    .tpdg-rc-custom-line__label {
        border: none;
        padding-left: 0;
        background: transparent;
    }
    .tpdg-rc-custom-add,
    .tpdg-rc-expense-row--custom.is-extra {
        display: none !important;
    }
}
