.feral-terrace-estimate {
    --estimate-ink: #25272a;
    --estimate-muted: #50565d;
    --estimate-border: #d6d9dc;
    --estimate-accent: #b62528;
    box-sizing: border-box;
    width: 100%;
    margin: 16px 0;
    padding: clamp(16px, 3vw, 26px);
    color: var(--estimate-ink);
    background: #fff;
    border: 1px solid var(--estimate-border);
    border-top: 3px solid var(--estimate-accent);
    border-radius: 8px;
    scroll-margin-top: 110px;
}
.feral-estimate-cart { margin: 0 0 24px; }
.feral-terrace-estimate [hidden] { display: none !important; }
.feral-terrace-estimate h2 { margin: 0 0 10px; font-size: clamp(20px, 3vw, 26px); line-height: 1.2; }
.feral-terrace-estimate h3 { margin: 0; font-size: 17px; }
.feral-terrace-estimate p { margin: 0 0 12px; }
.feral-estimate-project {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: 'panes editor' 'sidebar editor';
    align-items: start;
    gap: 16px;
    margin-top: 16px;
}
.feral-estimate-pane-list, .feral-estimate-pane-editor, .feral-estimate-project-checkout, .feral-estimate-project-sidebar .feral-terrace-catalog {
    min-width: 0;
    padding: clamp(12px, 2vw, 18px);
    border: 1px solid var(--estimate-border);
    border-radius: 6px;
}
.feral-estimate-pane-list { grid-area: panes; background: #f4f6f7; }
.feral-estimate-pane-editor { grid-area: editor; }
.feral-estimate-project-sidebar { grid-area: sidebar; display: grid; gap: 16px; min-width: 0; }
.feral-estimate-project-sidebar .feral-terrace-catalog { margin: 0; font-size: 14px; color: var(--estimate-muted); }
.feral-estimate-project-sidebar .feral-terrace-catalog a { font-size: 16px; font-weight: 700; color: var(--estimate-accent); text-decoration: underline; }
.feral-estimate-pane-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.feral-estimate-pane-toolbar button, .feral-estimate-pane-card {
    min-height: 44px;
    padding: 6px 10px;
    background: #fff;
    color: var(--estimate-ink);
    border: 1px solid var(--estimate-border);
    border-radius: 5px;
    text-transform: none;
}
.feral-estimate-pane-toolbar button:disabled { opacity: .5; cursor: default; }
.feral-estimate-pane-cards { display: grid; gap: 8px; margin-top: 12px; }
.feral-terrace-estimate .feral-estimate-pane-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: start; text-transform: none; }
.feral-estimate-pane-card[aria-pressed="true"] { border-color: var(--estimate-accent); box-shadow: inset 3px 0 var(--estimate-accent); }
.feral-estimate-pane-details { display: grid; gap: 2px; }
.feral-estimate-pane-details small { color: var(--estimate-muted); }
.feral-estimate-pane-mini { width: min(35%, 104px); flex-shrink: 0; }
.feral-estimate-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
    gap: 12px;
    margin: 16px 0;
}
.feral-estimate-fields label { display: grid; gap: 5px; min-width: 0; margin: 0; font-weight: 600; }
.feral-estimate-fields :is(input, select) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    color: var(--estimate-ink);
    background-color: #fff;
    border: 1px solid var(--estimate-border);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
}
.feral-terrace-estimate :is(input, select, button, a):focus-visible { outline: 2px solid var(--estimate-accent); outline-offset: 2px; }
.feral-estimate-templates { min-width: 0; margin: 0; padding: 0; border: 0; }
.feral-estimate-templates legend { margin-bottom: 8px; font-weight: 600; }
.feral-estimate-template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr)); gap: 8px; }
.feral-estimate-template { position: relative; display: block; margin: 0; cursor: pointer; }
.feral-estimate-template input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.feral-estimate-template-card {
    display: grid;
    align-content: start;
    gap: 2px;
    height: 100%;
    padding: 6px 8px;
    color: var(--estimate-ink);
    border: 1px solid var(--estimate-border);
    border-radius: 5px;
    font-size: 12px;
    line-height: 1.35;
}
.feral-estimate-template-card svg { display: block; width: 100%; height: auto; }
.feral-estimate-template-card small { color: var(--estimate-muted); }
.feral-estimate-template input:checked + .feral-estimate-template-card { border-color: var(--estimate-accent); background: #fff6f6; }
.feral-estimate-template input:focus-visible + .feral-estimate-template-card { outline: 2px solid var(--estimate-accent); outline-offset: 2px; }
.feral-estimate-project-actions { display: grid; gap: 12px; }
.feral-estimate-region-field { margin: 0; }
.feral-estimate-calculate.button {
    min-height: 44px;
    padding: 10px 16px;
    color: #fff;
    background: var(--estimate-accent);
    border: 0;
    border-radius: 4px;
}
.feral-estimate-calculate.button:disabled { opacity: .65; cursor: wait; }
.feral-estimate-message { color: var(--estimate-accent); }
.feral-estimate-message:not(:empty) { margin-top: 10px; }
.feral-estimate-message:empty { display: none; }
.feral-estimate-summary {
    margin-top: 16px;
    padding: 16px;
    background: #f4f6f7;
    border-radius: 6px;
}
.feral-estimate-summary p:first-child { margin-bottom: 2px; font-weight: 600; }
.feral-estimate-summary p:last-child { margin-bottom: 0; }
.feral-estimate-cart-action { margin-top: 12px; }
.feral-estimate-cart-action button { width: 100%; }
.feral-estimate-total { display: block; margin-bottom: 4px; font-size: clamp(23px, 4vw, 32px); }
.feral-estimate-figure { width: 100%; max-width: 340px; margin: 12px auto 0; text-align: center; }
.feral-estimate-figure svg { display: block; width: 100%; height: auto; }
.feral-estimate-figure figcaption, .feral-estimate-terms { color: var(--estimate-muted); font-size: 14px; }
.feral-estimate-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.feral-estimate-contact-card { min-width: 0; padding: clamp(12px, 2vw, 18px); border: 1px solid var(--estimate-border); border-radius: 6px; background: #f4f6f7; }
.feral-estimate-contact-card h3 { margin-bottom: 8px; }
.feral-estimate-contact-card small { display: block; margin-top: 8px; color: var(--estimate-muted); }
.feral-estimate-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.feral-estimate-contact-card a.button { min-height: 44px; max-width: 100%; white-space: normal; text-align: center; }
.feral-estimate-contact-card a.feral-estimate-contact-primary { background: var(--estimate-accent); color: #fff; }
.feral-estimate-quote .feral-quote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
    gap: 12px;
}
.feral-estimate-quote label { display: block; margin-bottom: 10px; }
.feral-estimate-quote input[type="file"] { display: block; max-width: 100%; }
.feral-estimate-quote .feral-quote-file {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 4px;
}
.feral-quote-file-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid var(--estimate-border);
    border-radius: 4px;
    background: #f4f6f7;
    font-weight: 600;
}
.feral-quote-file-status { min-width: 0; color: var(--estimate-muted); overflow-wrap: anywhere; }
.feral-estimate-quote .feral-quote-file input[type="file"] {
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 1;
    width: 100%;
    height: 44px;
    opacity: 0;
    cursor: pointer;
}
.feral-quote-file:focus-within .feral-quote-file-button { outline: 2px solid var(--estimate-accent); outline-offset: 2px; }
.feral-estimate-quote textarea { min-height: 96px; }
.feral-estimate-quote .wpcf7-submit { background: var(--estimate-accent); color: #fff; }
.feral-estimate-terms { margin-top: 16px; }
.feral-estimate-terms p:last-child { margin-bottom: 0; }
@media (max-width: 700px) {
    .feral-estimate-project { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: 'panes' 'editor' 'sidebar'; }
    .feral-estimate-contact { grid-template-columns: 1fr; }
}
