.ref-tool {
    --rt-ink: #1c201b;
    --rt-green: #255a50;
    --rt-line: #d9d7ce;
    --rt-pale: #edf0e9;
    --rt-paper: #fbfaf6;
    color: var(--rt-ink);
    margin: 24px 0 52px;
    font: 15px/1.49 Arial, sans-serif
}

.ref-tool :is(h1, h2, h3, .rc-total strong, [data-formula], .rt-example strong) {
    color: var(--rt-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    line-height: 1.07;
    letter-spacing: -.04em;
    margin: 0
}

.ref-tool h1 {
    font-size: clamp(38px, 4.45vw, 68px)
}

.ref-tool h2 {
    font-size: clamp(27px, 2.65vw, 40px)
}

.ref-tool h3 {
    font-size: 22px
}

.ref-tool p {
    margin: 9px 0 14px;
    color: #484a44;
    line-height: 1.48
}

.ref-tool a {
    color: var(--rt-green)
}

.rt-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: clamp(20px, 4vw, 64px);
    padding: 0 0 18px
}

.rt-hero>div {
    align-self: center;
    padding: 16px 0
}

.rt-hero>img {
    width: 100%;
    height: 100%;
    max-height: 310px;
    min-height: 210px;
    object-fit: cover;
    border-radius: 9px
}

.rt-hero>div>small,
.rt-scope>small,
.rt-columns section>small,
.rt-example>small {
    display: block;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #254e44;
    margin: 0 0 12px
}

.rt-hero>div>p {
    font-size: 17px;
    max-width: 54ch;
    margin: 14px 0 0
}

.rt-hero .rt-meta {
    font-size: 11px;
    color: #595d54;
    margin: 18px 0 0
}

.rt-callout,
.rt-benefits,
.rt-actions {
    display: flex;
    align-items: center;
    gap: 28px
}

.rt-callout {
    padding: 19px 24px;
    margin: 0 0 20px;
    background: #e6ece8;
    border-radius: 8px;
    justify-content: space-between
}

.rt-callout p,
.rt-scope>p {
    margin: 5px 0 0
}

.ref-tool .rt-btn,
.ref-tool .rt-outline {
    font: 600 14px/1.2 Arial, sans-serif;
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--rt-green);
    color: white;
    background: var(--rt-green);
    white-space: nowrap;
    display: inline-block
}

.ref-tool .rt-outline {
    background: transparent;
    color: var(--rt-green)
}

.rt-scope ol {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 18px 0 30px
}

.rt-scope li {
    background: #f5f3ec;
    border: 1px solid var(--rt-line);
    border-radius: 7px;
    overflow: hidden
}

.rt-scope li img {
    display: block;
    width: 100%;
    height: clamp(85px, 10vw, 140px);
    object-fit: cover
}

.rt-scope li>div {
    position: relative;
    padding: 20px 12px 12px
}

.rt-scope li i {
    position: absolute;
    top: -18px;
    background: var(--rt-paper);
    border-radius: 50%;
    padding: 5px 8px;
    font: italic 16px Georgia, serif
}

.rt-scope li h3 {
    font-size: 21px
}

.rt-scope li p {
    margin: 5px 0 0;
    font-size: 14px
}

.rt-columns,
.rc-bottom,
.rt-sheet {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: clamp(20px, 3vw, 44px)
}

.rt-columns>section+section {
    border-left: 1px solid var(--rt-line);
    padding-left: clamp(16px, 3vw, 38px)
}

.ref-tool table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    display: table
}

.ref-tool :is(td, th) {
    border: 0;
    border-bottom: 1px solid var(--rt-line);
    padding: 8px 10px;
    text-align: left;
    line-height: 1.35;
    background: transparent;
    color: var(--rt-ink)
}

.ref-tool thead th {
    background: #e4eae1
}

.rt-example {
    padding: 16px;
    background: var(--rt-pale);
    border-radius: 7px
}

.rt-example div {
    display: grid;
    grid-template-columns: 1fr 1fr
}

.rt-example div p {
    margin: 0;
    padding: 0 8px;
    font-size: 13px
}

.rt-example div p+p {
    border-left: 1px solid var(--rt-line)
}

.rt-example strong {
    display: block;
    font-size: 28px;
    margin: 6px 0
}

.rt-source,
.rc-options {
    border-top: 1px solid var(--rt-line);
    margin-top: 22px;
    padding-top: 14px
}

.ref-tool summary {
    cursor: pointer;
    color: var(--rt-green);
    font-weight: 600
}

.rt-benefits {
    font-size: 13px;
    justify-content: space-between;
    margin-top: 22px
}

.rt-benefits b {
    border-left: 2px solid #729084;
    padding-left: 9px
}

.rt-worksheet .rt-hero {
    grid-template-columns: 1.45fr 1fr
}

.rt-sheet {
    grid-template-columns: .8fr 1.3fr;
    margin: 18px 0
}

.rt-sheet details {
    border: 1px solid var(--rt-line);
    border-radius: 5px;
    padding: 10px 14px;
    margin: 4px 0
}

.rt-sheet table {
    table-layout: fixed
}

.rt-sheet th:first-child {
    width: 25%
}

.rt-sheet :is(td, th) {
    padding: 6px;
    border: 1px solid var(--rt-line)
}

.rt-sheet thead th:not(:first-child) {
    background: #41665a;
    color: white;
    text-align: center
}

.rt-sheet textarea {
    width: 100%;
    min-height: 24px;
    display: block;
    resize: vertical;
    padding: 2px 3px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #a4aaa0;
    font: 14px Arial, sans-serif
}

.rt-actions {
    flex-wrap: wrap;
    gap: 12px
}

.rt-actions p {
    font-size: 13px
}

.ref-tool .checks input {
    width: auto
}

.rc-hero {
    background: #f5f2ea;
    grid-template-columns: 1.35fr 1fr;
    gap: 0;
    padding: 0;
    border-radius: 8px;
    overflow: hidden
}

.rc-hero>div {
    padding: 26px 32px 65px
}

.rc-hero>img {
    max-height: 340px;
    border-radius: 0
}

.rc-box {
    position: relative;
    margin: -38px 14px 20px;
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 12px;
    padding: clamp(16px, 2.4vw, 34px);
    box-shadow: 0 5px 18px #392e2010
}

.rc-inputs,
.rc-optiongrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px
}

.rc-inputs>[data-mode],
.rc-inputs>[data-flat] {
    display: contents
}

.ref-tool [hidden] {
    display: none !important
}

.rc-field {
    display: block;
    min-width: 0;
    font-size: 15px;
    color: var(--rt-ink)
}

.rc-field>span {
    display: flex;
    align-items: center;
    border: 1px solid var(--rt-line);
    border-radius: 6px;
    margin: 6px 0;
    padding-right: 10px;
    background: var(--rt-paper)
}

.rc-field input {
    border: 0;
    width: 100%;
    min-width: 0;
    font-weight: 400;
    font-size: 21px;
    padding: 7px 10px;
    color: var(--rt-ink);
    background: transparent
}

.rc-field i {
    font-style: normal;
    white-space: nowrap;
    font-size: 13px
}

.rc-field small {
    display: block;
    line-height: 1.35;
    font-weight: 400;
    color: #50554f
}

.rc-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--rt-line)
}

.rc-result small {
    display: block;
    margin-bottom: 7px
}

#estimate-output {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--rt-line)
}

.est-card {
    background: var(--rt-paper, #fbfaf6);
    border: 1px solid var(--rt-line, #d9d7ce);
    border-radius: 8px;
    padding: 16px 20px
}

.est-card-benchmark {
    background: #f7f9f6;
    border-color: #ccd7cf
}

.est-card-benchmark .big {
    font-size: clamp(28px, 3.5vw, 44px);
    color: #184b41;
    font-family: Georgia, serif;
    margin: 4px 0 6px;
    line-height: 1.1
}

.est-card-quote {
    background: #ffffff;
    border-left: 4px solid var(--rt-green, #255a50)
}

.est-card-quote.est-quote-above {
    border-left-color: #b86214
}

.est-card-quote.est-quote-below {
    border-left-color: #8c3b4f
}

.est-status {
    display: inline-block;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px
}

.est-status-within {
    background: #e2eee6;
    color: #1b5847
}

.est-status-above {
    background: #fbf2e3;
    color: #874e11
}

.est-status-below {
    background: #f4edf0;
    color: #6d283c
}

.est-card-labor {
    background: #f5f3ec;
    border: 1px dashed var(--rt-line, #d9d7ce);
    font-size: 14px
}

.est-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #4b6b61;
    margin-bottom: 4px
}

[data-formula] {
    font-size: clamp(19px, 2.4vw, 37px)
}

.rc-total {
    padding: 13px 20px;
    text-align: center;
    background: #e6eee7;
    border-radius: 9px;
    min-width: 145px
}

.rc-total strong {
    font-size: clamp(30px, 3.5vw, 52px);
    color: #184b41
}

.rc-total small {
    margin: 3px 0 0
}

.rc-optiongrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 15px 0
}

.rc-options select {
    display: block;
    margin-top: 5px;
    max-width: 100%
}

.rc-options input[type=checkbox] {
    width: auto
}

.rc-bottom {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0 14px
}

.rc-bottom>div {
    padding: clamp(16px, 2vw, 30px);
    border: 1px solid var(--rt-line);
    border-radius: 9px
}

.rc-bottom ul {
    padding-left: 20px
}

.rc-bottom li {
    margin: 10px 0
}

.rc-bottom [data-seasons]>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--rt-pale);
    padding: 9px 14px;
    border-bottom: 1px solid var(--rt-line)
}

.rc-bottom [data-seasons] small {
    display: block;
    color: #536258
}

.ref-tool :focus-visible {
    outline: 2px solid #177f6f;
    outline-offset: 2px
}

.rt-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    margin: 22px 0 0;
    padding: 0;
    border: 0
}

.rt-checks legend {
    font-weight: 700;
    margin-bottom: 8px
}

.rt-checks label {
    font-size: 15px
}

.rt-checks input {
    width: auto;
    margin-right: 6px
}

@media(max-width:760px) {
    .rt-checks {
        grid-template-columns: 1fr
    }
}

@media print {

    .toolbar,
    .pl-switch,
    .pl-tools,
    .pl-progress,
    .pl-layout-cta,
    .pl-output>button,
    .rc-options,
    .rc-box button,
    button,
    .rt-contents,
    .edition-rail,
    .rt-hero>img,
    .notice+.toolbar {
        display: none !important
    }

    .report,
    .rc-result,
    .rt-extra {
        break-inside: avoid
    }
}

@media(max-width:760px) {

    .rt-hero,
    .rt-worksheet .rt-hero,
    .rc-hero {
        grid-template-columns: 1fr;
        gap: 10px
    }

    .rt-hero>img {
        min-height: 0;
        height: 170px
    }

    .rt-hero>div {
        padding: 0
    }

    .rt-hero.rc-hero>div {
        padding: 20px
    }

    .rc-box {
        margin: -24px 7px 16px
    }

    .rc-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 14px
    }

    .rt-columns,
    .rc-bottom,
    .rt-sheet {
        grid-template-columns: 1fr
    }

    .rt-columns>section+section {
        border-left: 0;
        padding-left: 0
    }

    .rc-bottom {
        margin: 0
    }

    .rt-scope ol {
        grid-template-columns: repeat(2, 1fr)
    }

    .rt-callout {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px
    }

    .ref-tool table {
        font-size: 12px
    }

    .rt-sheet :is(th, td) {
        padding: 4px
    }

    .rc-result {
        flex-wrap: wrap
    }

    .rt-actions {
        align-items: flex-start
    }

    .rt-benefits {
        gap: 8px
    }

    .rt-example {
        padding: 12px
    }
}

@media print {

    .ref-tool .rt-actions,
    .rt-worksheet .rt-hero img,
    .rt-worksheet .rt-source {
        display: none
    }

    .rt-sheet {
        display: block
    }

    .rt-sheet details {
        display: inline-block
    }

    .rt-sheet tr,
    .rt-sheet textarea {
        break-inside: avoid
    }

    .rt-sheet textarea {
        min-height: 45px
    }
}

.rt-extra {
    border-top: 1px solid #dedfce;
    margin: 24px 0;
    padding: 22px 0
}

.rt-extra>div {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 12px 0 24px
}

.rt-extra article {
    flex: 1 1 175px;
    padding: 14px;
    border: 1px solid #dedfce;
    border-radius: 7px
}

.rt-extra img {
    width: 100%;
    height: 95px;
    object-fit: cover
}

.rt-extra h3 {
    margin-top: 8px
}

.rt-extra label {
    display: grid;
    gap: 4px;
    font-size: 13px
}

.rt-extra label>input[type=text],
.rt-extra textarea {
    width: 100%;
    max-width: 100%;
    padding: 5px;
    border: 1px solid #cccebf;
    border-radius: 4px
}

.rt-extra .rt-scroll {
    display: block;
    overflow: auto
}

.rt-scroll table {
    width: 100%;
    min-width: 590px
}

.rt-scroll td,
.rt-scroll th {
    padding: 7px
}

.rt-scroll td label {
    display: flex
}

.rt-contents {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px 0;
    font-size: 13px
}

.annual-plan form {
    background: #f1f2e6;
    padding: 16px;
    border-radius: 9px
}

.annual-plan form>label {
    display: block;
    font-weight: 600
}

.annual-plan input {
    max-width: 100px;
    width: 100%;
    padding: 7px;
    border: 1px solid #bfc7b5;
    border-radius: 4px;
    background: #fffef9
}

.annual-scroll {
    overflow: auto
}

.annual-scroll table {
    width: 100%;
    min-width: 430px
}

.annual-scroll td,
.annual-scroll th {
    text-align: left;
    padding: 7px
}

.annual-plan #annual-result {
    font-weight: 700;
    color: #354727
}

.annual-plan summary {
    cursor: pointer
}

/* Beginner vs Advanced Mode Toggle & Presets */
.rc-mode-picker {
    display: inline-flex;
    background: #eaece4;
    padding: 4px;
    border-radius: 6px;
    margin-bottom: 20px;
    gap: 4px;
}
.rc-mode-btn {
    border: 0;
    background: transparent;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #485244;
    border-radius: 4px;
    cursor: pointer;
    transition: all .2s;
}
.rc-mode-btn.active {
    background: #fff;
    color: var(--rt-ink);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.rc-presets-wrap {
    margin-bottom: 16px;
}
.rc-presets-wrap label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.rc-presets-wrap select {
    width: 100%;
    padding: 9px;
    border: 1px solid #bfc7b5;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}
.rc-note-callout {
    background: #f1f3ea;
    border-left: 3px solid #6b7a5a;
    padding: 10px 14px;
    font-size: 13px;
    margin: 12px 0 16px;
    color: #3b4238;
}

/* Combined Project Report */
.pr-wrap {
    max-width: 980px;
    margin: 0 auto;
}
.pr-section {
    background: #fff;
    border: 1px solid #dedfce;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}
.pr-section h2 {
    font-size: 26px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
.pr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.pr-metric {
    background: #f8f8f2;
    padding: 14px;
    border-radius: 6px;
    border: 1px solid #e2e4d8;
}
.pr-metric small {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #626a5c;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.pr-metric strong {
    font-size: 22px;
    font-family: Georgia, serif;
    color: #1c201b;
}
.pr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.pr-table th, .pr-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e2d6;
}
.pr-table th {
    background: #f4f5ee;
    font-weight: 600;
}
.pr-empty {
    padding: 20px;
    background: #f8f9f2;
    border: 1px dashed #bfc7b5;
    border-radius: 6px;
    text-align: center;
    color: #555e50;
}
.pr-empty a {
    font-weight: 600;
}
@media print {
    .pr-actions, .rc-mode-picker, header, footer, .toolbar, .rt-actions {
        display: none !important;
    }
    .pr-section {
        border: 1px solid #000;
        break-inside: avoid;
        margin-bottom: 16px;
    }
}
.pr-actions button:disabled{opacity:.5;cursor:not-allowed}
