:root {
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color: #172e28;
    background: #f3f5ef;
    font-size: 16px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.topbar {
    height: 76px;
    padding: 0 max(24px,calc((100vw - 1080px)/2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dce4d9;
    background: #fff
}

.brand {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #173c31;
    text-decoration: none
}

.brand span {
    color: #d28b4e
}

.brand small {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .15em;
    color: #6c7d70;
    margin-left: 8px
}

.topnote {
    font-size: 13px;
    color: #718278
}

main {
    width: min(100% - 40px,650px);
    margin: 72px auto 60px;
    flex: 1
}

.intro {
    margin-bottom: 32px
}

.eyebrow {
    font-size: 11px;
    letter-spacing: .16em;
    font-weight: 800;
    color: #a26539;
    margin: 0 0 12px
}

h1 {
    font-size: clamp(32px,6vw,48px);
    letter-spacing: -.04em;
    line-height: 1.08;
    margin: 0 0 14px
}

h2 {
    font-size: 24px;
    letter-spacing: -.025em;
    margin: 0 0 12px
}

.intro>p:last-child,.hint,#invitation-description {
    color: #65766b;
    line-height: 1.6
}

.card {
    background: white;
    border: 1px solid #dde6dc;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 12px 34px #294d3510
}

form {
    display: grid;
    gap: 10px;
    margin-top: 22px
}

label {
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px
}

input {
    font: inherit;
    padding: 13px;
    border: 1px solid #cbd8cf;
    border-radius: 8px;
    width: 100%
}

input: focus {
    outline: 3px solid #9cc8b4
}

button {
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #245844;
    color: white;
    border: 0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 12px
}

button: disabled {
    opacity: .6;
    cursor: wait
}

.secondary {
    background: #e9f0e9;
    color: #245844
}

.text-button {
    background: none;
    color: #245844;
    padding: 0;
    margin: 0
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.hint {
    font-size: 14px;
    margin: 4px 0
}

.message {
    padding: 14px;
    border-radius: 8px;
    background: #f8eee8;
    color: #754626;
    line-height: 1.5
}

.footnote {
    color: #76867b;
    font-size: 13px;
    line-height: 1.6;
    margin: 24px 4px
}

ul {
    list-style: none;
    padding: 0
}

li {
    padding: 16px 0;
    border-bottom: 1px solid #e5ece5;
    font-weight: 700
}

li small {
    display: block;
    font-weight: 400;
    color: #738477;
    margin-top: 5px
}

footer {
    text-align: center;
    padding: 25px;
    color: #8a9a8e;
    font-size: 12px
}

@media(max-width:520px) {
    .topnote {
        display: none
    }

    main {
        margin-top: 48px
    }

    .card {
        padding: 24px
    }

    .topbar {
        padding: 0 20px
    }

}

[hidden] {
    display: none!important
}

main {
    width: min(100% - 40px,1060px)
}

#entry {
    max-width: 600px
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px
}

.section-head h2 {
    font-size: 30px
}

.section-head .hint {
    max-width: 650px
}

.section-head button {
    flex-shrink: 0;
    margin: 0
}

.list-card {
    padding: 8px 26px 24px
}

.rows {
    margin: 0
}

.rows li {
    padding: 0
}

.row-button {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    margin: 0;
    padding: 18px 0;
    background: transparent;
    color: #172e28;
    border-radius: 0
}

.row-button:hover strong {
    color: #257151
}

.row-button small,.items small {
    display: block;
    font-weight: 400;
    color: #738477;
    margin-top: 5px
}

.arrow {
    font-size: 22px;
    color: #779183
}

.back {
    padding: 0;
    background: none;
    color: #3d6d58;
    margin: 0 0 26px
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0,1.35fr) minmax(280px,1fr);
    gap: 20px;
    align-items: start
}

.card h3 {
    font-size: 19px;
    letter-spacing: -.02em;
    margin: 0 0 10px
}

.card h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #547263;
    margin: 24px 0 8px
}

.scope {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6
}

.items {
    list-style: none;
    margin: 20px 0 0;
    padding: 0
}

.items li {
    padding: 15px 0
}

.badge {
    font-size: 11px;
    background: #edf3ee;
    color: #52735e;
    border-radius: 20px;
    padding: 6px 10px;
    white-space: nowrap
}

.total {
    font-size: 28px;
    font-weight: 750;
    color: #245844;
    letter-spacing: -.04em;
    margin: 18px 0
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.actions button,.button-link {
    margin: 0
}

.actions button {
    padding: 12px 14px
}

.button-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #b8cfc1;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    color: #245844
}

.share-panel {
    border-top: 1px solid #e5ece5;
    margin-top: 22px;
    padding-top: 20px
}

.share-panel input {
    font-size: 13px;
    margin: 8px 0
}

.share-panel .actions {
    margin-top: 14px
}

.message {
    margin-bottom: 18px
}

button: focus-visible,a:focus-visible,input:focus-visible {
    outline: 3px solid #9cc8b4;
    outline-offset: 2px
}

@media(max-width:700px) {
    .detail-grid {
        grid-template-columns: 1fr
    }

    .section-head {
        display: block
    }

    .section-head button {
        margin-top: 16px
    }

    .list-card {
        padding: 8px 20px 20px
    }

}

.line-total {
    color: #245844;
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
}

.quote-totals {
    margin-top: 20px;
    border-top: 1px solid #dce6dd;
    padding-top: 12px;
}

.quote-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 6px 0;
    color: #607268;
}

.quote-totals strong {
    color: #172e28;
}

.quote-totals .quote-grand {
    border-top: 1px solid #c8d8cb;
    margin-top: 8px;
    padding-top: 14px;
    font-size: 19px;
    font-weight: 700;
    color: #245844;
}

.quote-grand strong {
    color: #245844;
}

.pdf-card {
    margin-top: 20px;
}

.preview-actions {
    margin: 18px 0 12px;
}

.preview-actions button[aria-pressed="true"] {
    background: #245844;
    color: white;
}

#quote-preview {
    width: 100%;
    height: min(80vh, 1000px);
    min-height: 600px;
    border: 1px solid #dce6dd;
    border-radius: 8px;
    background: white;
}

#invoice-alerts button, #invoice-filter { min-height:48px; }
#invoice-filter { width:100%; padding:12px; border:1px solid #ccd5cf; border-radius:8px; background:white; font:inherit; }

.payment-badge { margin-top: 8px; }
.badge[data-status] { display: inline-block; font-size: 13px; font-weight: 700; padding: 6px 12px; }
.badge[data-status="Settled"] { background: #d9efdf; color: #17472b; }
.badge[data-status="Part-paid"] { background: #fff0cb; color: #714900; }
.document-column { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
#financial-cards { border-top: 1px solid #ccd5cf; margin-top: 24px; padding-top: 20px; }
#payment-section { border-radius: 16px; }
.financial-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 16px; }
.financial-totals dt { color: #52735e; }
.financial-totals dd { margin: 0; font-weight: 700; text-align: right; }
.payment-invoice { min-height: 48px; margin-top: 12px; }
#payment-history small { overflow-wrap: anywhere; }

#document-status { display: inline-block; margin-right: 8px; }
.job-photo { margin: 16px 0; }
.job-photo img { max-width: 100%; max-height: 280px; display: block; border-radius: 8px; }
.job-photo figcaption { margin-top: 6px; }

#social-options {
    margin-top: 22px;
    padding-top: 12px;
    border-top: 1px solid #dce4d9;
}

#social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#appleid-signin {
    width: 220px;
    height: 40px;
}
