main:has(> [data-order-wizard]) { padding-top: 18px; }
.wizard-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 14px;
}
.wizard-heading h1 { margin: 0; font-size: clamp(23px, 2vw, 30px); }
.wizard-heading .back-link { margin: 0; }
.wizard-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; list-style: none; padding: 0; margin: 12px 0 8px; }
.wizard-steps button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 46px;
    padding: 7px 10px;
    text-align: left;
    color: #587063;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    font-size: 11px;
    line-height: 1.4;
}
.wizard-steps button > span { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border: 1px solid #d7e2d8; border-radius: 50%; font-weight: 700; }
.wizard-steps button.is-active { color: #215f47; border-color: #72a78b; background: #edf5ec; }
.wizard-steps button.is-active > span { color: white; background: #216c55; border-color: #216c55; }
.wizard-steps button.is-complete > span { color: #216c55; background: #e4efe3; }
.wizard-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 14px;
    margin-bottom: 10px;
    font-size: 12px;
}
.wizard-meta p { margin: 0; }
.wizard-step-status { font-weight: 700; }
[data-order-wizard] .wizard-customer { padding: 12px 16px; margin-bottom: 0; }
[data-order-wizard] .wizard-step { padding: clamp(14px, 2vw, 22px); margin-bottom: 12px; }
[data-order-wizard] .wizard-step h2 { margin: 0 0 14px; }
.wizard-step[hidden], .wizard-actions button[hidden] { display: none; }
.wizard-actions { position: sticky; bottom: 0; z-index: 25; padding: 9px 12px; background: #f4f6f5f5; border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
.wizard-customer .lookup { max-width: 650px; }
[data-order-wizard] .panel:is(.wizard-customer, .wizard-step) {
    overflow: visible;
}
[data-order-wizard] .lookup-results {
    z-index: 26;
}
.calculated-value { display: block; padding: 12px; background: #edf4e9; color: #386748; border-radius: 7px; min-height: 43px; }
.winding-guide { display: block; max-width: 100%; max-height: 270px; margin-top: 15px; border-radius: 8px; }
.lookup-validation { display: block; color: #a44737; margin-top: 8px; }
.lookup-results button:focus {
    background: #d9eee1;
    color: #153e30;
    box-shadow: inset 3px 0 #276b50;
}
.order-expand-button { border: 1px solid #d7e2d8; border-radius: 50%; color: #42775b; background: #f6f9f4; min-width: 30px; height: 30px; padding: 4px; font-size: 16px; }
.order-expand-button[aria-expanded=true] { transform: rotate(90deg); background: #e3efde; }
.order-child-row > td { padding: 15px 25px 25px; background: #f5f8f2; }
.order-child-row[hidden] { display: none; }
.order-child-row table { background: white; min-width: 1100px; border: 1px solid #dce6d6; }
.order-child-row th { font-size: 9px; white-space: nowrap; }
.order-child-row td { padding: 13px 15px; }
.orders-master-table { min-width: 1550px; }
.child-caption { text-align: left; padding: 12px 15px; color: #517759; background: #edf4e8; font-weight: 700; }
.technology-details { padding: 18px 0; }
.technology-details > summary { color: #216c55; font-weight: 700; cursor: pointer; }
.technology-details section { margin-top: 22px; }
.technology-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin: 0; }
.technology-values dt { font-size: 11px; color: var(--muted); }
.technology-values dd { font-size: 13px; margin: 5px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media(max-width: 1100px) { .wizard-steps { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width: 760px) { .wizard-steps { grid-template-columns: repeat(2,minmax(0,1fr)); } .wizard-actions { gap: 7px; padding: 12px 0; } .wizard-actions .button { padding: 10px 13px; } .technology-values { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media print { .wizard-actions, .wizard-steps, .order-expand-button { display: none; } }
.order-date-control { position: relative; }
.order-date-control > [data-order-date] { padding-inline-end: 48px; }
.order-date-control > .order-date-native {
    position: absolute;
    inset-inline-end: 0;
    bottom: 0;
    width: 44px;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}
.order-date-button {
    position: absolute;
    inset: 1px 1px 1px auto;
    width: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #21654e;
    cursor: pointer;
}
.order-date-button:hover, .order-date-button:focus-visible { background: #e7f2ea; }

.worksheet-choice {
    width: min(94vw, 480px);
    max-height: 90vh;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
}
.worksheet-choice::backdrop { background: #132c2766; }
.worksheet-choice h2 { margin: 0 0 16px; }
.worksheet-choice [data-worksheet-mode] {
    display: grid;
    gap: 6px;
    width: 100%;
    margin-bottom: 10px;
    text-align: left;
    white-space: normal;
}
.worksheet-choice [data-worksheet-mode] span { font-weight: normal; }
