.msp-details__fields {
    padding: 4px 13px 1px;
}

.msp-field[hidden],
.msp-result-action[hidden] {
    display: none;
}

.msp-result-action {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
    border: 1px solid #b8dfe0;
    border-radius: 13px;
    background: #f2fbfb;
    padding: 14px;
}

.msp-result-action strong {
    color: var(--brand);
    font-size: 14px;
}

.msp-result-action p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.msp-result-action__secondary {
    margin: 0;
}

.msp-result-action--ready {
    border-color: #9bd4b5;
    background: #f1fbf5;
}

.msp-result-action[data-state="stale"] {
    border-color: #efc36d;
    background: #fff9ed;
}

.msp-result-action[data-state="stale"] strong {
    color: #915900;
}

.msp-flow-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: -4px 0 20px;
}

.msp-flow-summary div {
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--soft);
    padding: 10px;
}

.msp-flow-summary span {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.msp-flow-summary strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.msp-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 18px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.msp-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.msp-rib-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 250px;
    overflow: auto;
    padding: 10px;
    margin: -8px 0 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.msp-rib-editor label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
}

.msp-rib-editor input {
    width: 100%;
    border: 1px solid #cbdadd;
    border-radius: 8px;
    padding: 8px;
    font: inherit;
}

.msp-control-list {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

.msp-control-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 11px;
}

.msp-control-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.msp-control-item__head button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: #f8e8e8;
    color: #983a3a;
    font-size: 20px;
    cursor: pointer;
}

.msp-small-button {
    margin: 0 12px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--brand);
    padding: 9px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.msp-production-list {
    display: grid;
    gap: 10px;
}

.msp-production-list article {
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--soft);
    padding: 13px;
}

.msp-production-list article div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.msp-production-list article span,
.msp-production-list article small,
.msp-shop-note,
.msp-empty-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.msp-production-list article b {
    color: var(--brand);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.msp-shop-note {
    margin: 12px 0 0;
}

.msp-transfer-shortcut {
    width: 100%;
    margin-top: 10px;
}

.msp-transfer-intro,
.msp-transfer-check,
.msp-transfer-protection {
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 14px;
    background: var(--soft);
}

.msp-transfer-intro {
    position: relative;
    padding-right: 150px;
}

.msp-transfer-intro strong,
.msp-transfer-protection strong,
.msp-transfer-check > strong {
    color: var(--brand);
    font-size: 13px;
}

.msp-transfer-intro p,
.msp-transfer-check p,
.msp-transfer-protection p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.msp-transfer-intro > span {
    position: absolute;
    top: 14px;
    right: 14px;
    border-radius: 999px;
    padding: 6px 9px;
    background: #edf1f2;
    color: #587178;
    font-size: 10px;
    font-weight: 800;
}

.msp-transfer-intro > span[data-state="ready"] { background: #e7f7ef; color: #13704a; }
.msp-transfer-intro > span[data-state="warning"] { background: #fff3dc; color: #915900; }
.msp-transfer-intro > span[data-state="busy"] { background: #e8f3f6; color: var(--brand); }
.msp-transfer-intro > span[data-state="error"] { background: #fbe7e7; color: #983a3a; }
.msp-transfer-intro > span[data-state="stale"] { background: #fff3dc; color: #915900; }

.msp-transfer-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.msp-transfer-facts div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.msp-transfer-facts span {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.msp-transfer-facts strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: var(--brand);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.msp-transfer-check { margin-bottom: 10px; }
.msp-transfer-check[data-state="ready"] { border-color: #8fd0ae; background: #f0fbf5; }
.msp-transfer-check[data-state="warning"] { border-color: #efc36d; background: #fff9ed; }
.msp-transfer-check[data-state="error"] { border-color: #f0b4b4; background: #fff5f5; }
.msp-transfer-check ul { margin: 8px 0 0; padding-left: 18px; color: #6f5a32; font-size: 11px; }
.msp-transfer-export { margin-top: 14px; }
.msp-transfer-protection { margin-top: 12px; border-left: 4px solid var(--brand); }

.msp-board-settings {
    margin: 14px 0;
    border: 1px solid #b8dfe0;
    border-radius: 13px;
    background: #f4fbfb;
    padding: 14px;
}

.msp-board-settings .msp-section-heading { margin-top: 0; }
.msp-board-settings .msp-transfer-check { margin: 4px 0 0; }

@media(max-width:700px) {
    .msp-transfer-intro { padding-right: 14px; }
    .msp-transfer-intro > span { position: static; display: inline-block; margin-top: 9px; }
    .msp-transfer-facts { grid-template-columns: 1fr; }
}

.msp-chart-card--wing {
    margin-bottom: 18px;
}

.msp-chart-card--wing svg {
    min-height: 260px;
}

.msp-chart-card--wing-3d{margin-bottom:18px;overflow:hidden}.msp-wing-3d{position:relative;min-height:390px;background:linear-gradient(180deg,#f8fcfc,#e9f3f4);border-radius:0 0 14px 14px;overflow:hidden}.msp-wing-3d canvas{display:block;width:100%;height:390px;touch-action:none;cursor:grab;outline:none}.msp-wing-3d canvas.is-dragging{cursor:grabbing}.msp-wing-3d canvas:focus-visible{box-shadow:inset 0 0 0 3px rgba(22,139,134,.35)}.msp-wing-3d__hint{position:absolute;left:14px;top:13px;padding:7px 10px;border:1px solid rgba(180,207,210,.85);border-radius:8px;background:rgba(255,255,255,.86);backdrop-filter:blur(6px);color:#587178;font-size:11px;pointer-events:none}.msp-wing-3d__legend{position:absolute;right:14px;bottom:13px;display:flex;flex-wrap:wrap;gap:8px 12px;padding:8px 11px;border:1px solid rgba(180,207,210,.85);border-radius:9px;background:rgba(255,255,255,.88);backdrop-filter:blur(6px);font-size:11px;color:#466269;pointer-events:none}.msp-wing-3d__legend span{display:flex;align-items:center;gap:5px}.msp-wing-3d__legend i{width:11px;height:11px;border-radius:3px;background:rgba(33,150,145,.45)}.msp-wing-3d__legend i[data-kind="edge"]{height:3px;border-radius:0;background:#0b7774}.msp-wing-3d__legend i[data-kind="rib"]{height:2px;border-radius:0;background:#477d87}.msp-wing-3d__legend i[data-kind="control"]{background:#ee9850}.msp-wing-3d__legend i[data-kind="spar"]{height:3px;border-radius:0;background:#9b4e8d}.msp-wing-3d__legend i[data-kind="tube"]{height:3px;border-radius:0;background:#d13c61}

@media(max-width:700px){.msp-wing-3d,.msp-wing-3d canvas{height:320px;min-height:320px}.msp-wing-3d__hint{display:none}.msp-wing-3d__legend{left:10px;right:10px;justify-content:center}}

.msp-wing-shape {
    fill: url(#mspWingFill);
    stroke: var(--brand);
    stroke-width: 3;
}

.msp-wing-rib {
    stroke: #7aa6ad;
    stroke-width: 1.5;
}

.msp-wing-rib:hover {
    stroke: var(--accent);
    stroke-width: 4;
}

.msp-wing-rib--closure {
    stroke: #f29b52;
    stroke-width: 2.2;
    stroke-dasharray: 5 3;
}

.msp-wing-cutout {
    fill: #fff;
    stroke: #9d4f8a;
    stroke-width: 2;
}

.msp-wing-station {
    fill: #fff;
    stroke: var(--brand);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.msp-wing-control {
    fill: rgba(242, 155, 82, .42);
    stroke: #d77a2f;
    stroke-width: 2;
}

.msp-wing-tube {
    stroke: #344b72;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 10 6;
}

.msp-wing-axis-label {
    fill: var(--muted);
    font-size: 12px;
}

.msp-wing-edge-label line {
    stroke: #173f4b;
    stroke-width: 2;
}

.msp-wing-edge-label text {
    fill: #173f4b;
    font-size: 12px;
    font-weight: 800;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .92);
    stroke-width: 4px;
    stroke-linejoin: round;
}

.msp-wing-spar {
    stroke: #7b4dba;
    stroke-width: 4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.msp-detail-note,
.msp-details__intro {
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.msp-inline-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
}

.msp-export-box {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(145deg, #f7fbfb, #fff);
}

.msp-export-box__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.msp-export-box__head strong,
.msp-export-box__head span {
    display: block;
}

.msp-export-box__head strong { color: var(--brand); font-size: 15px; }
.msp-export-box__head span { margin-top: 3px; color: var(--muted); font-size: 12px; }

.msp-export-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}

.msp-export-button {
    min-height: 64px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--brand);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.msp-export-button:hover,
.msp-export-button:focus-visible {
    border-color: #078c94;
    box-shadow: 0 5px 15px rgba(7, 140, 148, .12);
    transform: translateY(-1px);
    outline: none;
}

.msp-export-button strong,
.msp-export-button span { display: block; }
.msp-export-button strong { font-size: 12px; }
.msp-export-button span { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.msp-export-button--primary { grid-column: 1 / -1; border-color: #078c94; background: #078c94; color: #fff; }
.msp-export-button--primary span { color: rgba(255,255,255,.82); }

.msp-view-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.msp-view-actions > span {
    margin-right: 5px;
}

.msp-view-actions button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--brand);
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.msp-cart-state {
    margin: 10px 0;
    border-left: 4px solid #d79a3b;
    border-radius: 8px;
    background: #fff5e6;
    color: #754e14;
    padding: 10px 12px;
    font-size: 13px;
}

.msp-cart-state[data-state="ready"] {
    border-color: #1b9c64;
    background: #eaf8f1;
    color: #176540;
}

@media (max-width: 620px) {
    .msp-flow-summary {
        grid-template-columns: 1fr;
    }

    .msp-rib-editor {
        grid-template-columns: 1fr;
    }

    .msp-export-grid { grid-template-columns: 1fr; }
    .msp-export-button--primary { grid-column: auto; }
}


.msp-fullscreen-button {
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 10px;
    padding: 9px 12px;
    background: rgba(255,255,255,.1);
    color: inherit;
    cursor: pointer;
}

.msp-app:fullscreen,
.msp-app--fullscreen-fallback {
    width: 100vw;
    height: 100vh;
    max-width: none;
    overflow: auto;
    background: #eef4f5;
    z-index: 999999;
}

.msp-app--fullscreen-fallback {
    position: fixed;
    inset: 0;
}
.msp-download-center{grid-column:1/-1;display:flex;align-items:center;gap:12px;border:1px solid #9bd4b5;border-radius:11px;background:#f1fbf5;padding:10px 12px;color:#174b3e}.msp-download-center[hidden]{display:none}.msp-download-center>div{display:grid;gap:2px;min-width:0;margin-right:auto}.msp-download-center strong{font-size:12px}.msp-download-center span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:750}.msp-download-center small{color:#5e776e;font-size:10px}.msp-download-center__link{flex:0 0 auto;border-radius:8px;background:#087f70;color:#fff!important;padding:8px 11px;text-decoration:none;font-size:12px;font-weight:800}.msp-download-center>button{flex:0 0 auto;border:0;background:transparent;color:#54736a;font-size:22px;line-height:1;cursor:pointer}
.msp-projectbar{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr) minmax(360px,2.4fr);gap:12px 16px;align-items:end;padding:16px 20px;background:linear-gradient(135deg,#f5fafb,#eef7f6);border-bottom:1px solid #dbe8e9}.msp-projectbar label{display:grid;gap:5px}.msp-projectbar label>span{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#547078}.msp-projectbar input,.msp-projectbar select,.msp-compare select{min-height:38px;border:1px solid #c9dcde;border-radius:9px;background:#fff;padding:7px 10px;color:#173f47}.msp-projectbar__actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.msp-projectbar__actions button,.msp-project-import{min-height:36px;border:1px solid #bad2d4;border-radius:9px;background:#fff;padding:7px 10px;color:#174b55;font-size:12px;font-weight:750;cursor:pointer}.msp-projectbar__actions button:hover,.msp-project-import:hover{border-color:#168b86;background:#f0fbfa}.msp-projectbar__actions button:disabled{opacity:.42;cursor:not-allowed}.msp-projectbar__separator{width:1px;height:26px;background:#cbdcde;margin:0 2px}.msp-project-import{display:inline-flex!important;align-items:center}.msp-project-import input{display:none}.msp-projectbar__status{grid-column:1/-1;margin:-3px 0 0;color:#61777d;font-size:12px}.msp-projectbar__status[data-state="success"]{color:#08756f}.msp-projectbar__status[data-state="error"]{color:#ad3434}.msp-compare{padding:18px 20px;border-bottom:1px solid #dbe8e9;background:#fff}.msp-compare__head{display:flex;justify-content:space-between;gap:20px;align-items:start}.msp-compare__head div{display:grid;gap:3px}.msp-compare__head strong{font-size:17px;color:#173f47}.msp-compare__head span{font-size:12px;color:#698087}.msp-compare__head button{border:0;background:transparent;font-size:26px;line-height:1;color:#527078;cursor:pointer}.msp-compare__selectors{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.msp-compare__selectors label{display:grid;gap:5px;font-size:12px;font-weight:700;color:#547078}.msp-compare__table{overflow:auto;border:1px solid #deeaeb;border-radius:11px}.msp-compare__table table{width:100%;border-collapse:collapse;font-size:13px}.msp-compare__table th,.msp-compare__table td{text-align:right;padding:9px 12px;border-bottom:1px solid #e7efef;white-space:nowrap}.msp-compare__table th:first-child,.msp-compare__table td:first-child{text-align:left}.msp-compare__table thead th{background:#f4f9f9;color:#385a62}.msp-compare__delta--positive{color:#08756f}.msp-compare__delta--negative{color:#ad3434}

@media(max-width:900px){.msp-projectbar{grid-template-columns:1fr 1fr}.msp-projectbar__actions{grid-column:1/-1}.msp-compare__selectors{grid-template-columns:1fr}}
@media(max-width:600px){.msp-projectbar{grid-template-columns:1fr;padding:14px}.msp-projectbar__actions,.msp-projectbar__status,.msp-download-center{grid-column:1}.msp-projectbar__separator{display:none}.msp-projectbar__actions button,.msp-project-import{flex:1 1 auto;justify-content:center}.msp-download-center{align-items:stretch;flex-wrap:wrap}.msp-download-center>div{flex:1 1 100%}.msp-download-center__link{flex:1 1 auto;text-align:center}.msp-compare{padding:14px}}

.msp-mode-card {
    margin: 14px 0;
    padding: 15px 16px;
    border: 1px solid #cde1e2;
    border-radius: 12px;
    background: linear-gradient(135deg, #f4fbfa, #edf7f8);
}

.msp-mode-card strong { color: #174b55; font-size: 16px; }
.msp-mode-card p { margin: 5px 0 0; color: #4f6d74; }
.msp-mode-hint { margin: 0 0 14px; padding: 11px 13px; border-left: 4px solid #168b86; border-radius: 8px; background: #eef9f8; color: #315c63; font-size: 13px; }
.msp-alert--info { border-left-color: #168b86; background: #eef9f8; color: #315c63; }

.msp-profile-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.msp-profile-station { display: grid; gap: 9px; padding: 13px; border: 1px solid #d9e7e8; border-radius: 11px; background: #fbfdfd; }
.msp-profile-station > strong { color: #174b55; }
.msp-profile-station > small { color: #657d83; }
.msp-inline-upload { display: flex; align-items: center; justify-content: center; min-height: 38px; border: 1px dashed #8db8b9; border-radius: 9px; background: #f2faf9; color: #174b55; font-size: 12px; font-weight: 800; cursor: pointer; }
.msp-inline-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.msp-profile-copy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

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

/* Project safety and local recovery */
.msp-projectbar__status[data-state="warning"] { color: #8a5a00; }
.msp-recovery {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #efc36d;
    border-radius: 11px;
    background: #fff9ed;
    padding: 10px 12px;
    color: #754e14;
}
.msp-recovery[hidden] { display: none; }
.msp-recovery > div { display: grid; gap: 2px; margin-right: auto; }
.msp-recovery strong { font-size: 12px; }
.msp-recovery span { font-size: 11px; }
.msp-recovery button,
.msp-revision-picker button {
    border: 1px solid #d5b05f;
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    color: #754e14;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.msp-revision-picker {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 14px;
}
.msp-revision-picker label { display: grid; gap: 5px; color: #547078; font-size: 12px; font-weight: 700; }
.msp-revisions > p { margin: 14px 0 0; color: #698087; font-size: 13px; }

@media(max-width:600px) {
    .msp-recovery { grid-column: 1; align-items: stretch; flex-wrap: wrap; }
    .msp-recovery > div { flex: 1 1 100%; }
    .msp-revision-picker { grid-template-columns: 1fr; }
    .msp-revision-picker button { width: 100%; }
}

/* 2.7 workflow and visualization hierarchy */




.msp-projectbar {
    grid-template-columns: minmax(180px, .9fr) minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
    align-items: end;
    padding: 14px 20px;
}
.msp-projectbar__primary {
    display: flex;
    align-items: center;
    gap: 8px;
}
.msp-project-save,
.msp-projecttools > summary {
    min-height: 38px;
    border: 1px solid #bad2d4;
    border-radius: 9px;
    background: #fff;
    padding: 8px 11px;
    color: #174b55;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.msp-project-save {
    border-color: #087f8c;
    background: #087f8c;
    color: #fff;
}
.msp-projecttools { position: relative; }
.msp-projecttools > summary {
    display: flex;
    align-items: center;
    list-style: none;
    white-space: nowrap;
}
.msp-projecttools > summary::-webkit-details-marker { display: none; }
.msp-projecttools > summary::after { content: "⌄"; margin-left: 7px; }
.msp-projecttools[open] > summary { border-color: #168b86; background: #f0fbfa; }
.msp-projecttools .msp-projectbar__actions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    width: min(390px, 86vw);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    border: 1px solid #c9dcde;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 18px 40px rgba(17, 52, 64, .18);
}
.msp-projecttools .msp-project-import { justify-content: center; }
.msp-mode-summary {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin-top: -2px;
    color: #4f6d74;
    font-size: 11px;
}
.msp-mode-summary strong { color: #174b55; }
.msp-mode-summary p { margin: 0; }

.msp-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 0 18px;
}
.msp-tabs button {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 9px;
    align-items: center;
    min-width: 0;
    padding: 13px 11px 11px;
    text-align: left;
}
.msp-tabs button > span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #eef5f5;
    color: #5a7379;
    font-size: 10px;
}
.msp-tabs button > strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.msp-tabs button > small { overflow: hidden; text-overflow: ellipsis; color: #809297; font-size: 10px; font-weight: 500; white-space: nowrap; }
.msp-tabs button[aria-selected="true"] > span { background: #087f8c; color: #fff; }
.msp-tabs button[data-state="complete"] > span { background: #e3f6ec; color: #08704b; }
.msp-tabs button[data-state="complete"] > span::after { content: "✓"; font-size: 12px; font-weight: 900; }
.msp-tabs button[data-state="complete"] > span { font-size: 0; }
.msp-tabs button[data-state="attention"] > span { background: #fff0d1; color: #8b5900; }
.msp-tabs button[data-state="current"] > span { background: #087f8c; color: #fff; }

.msp-workflow-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 20px 0;
    border: 1px solid #efc36d;
    border-radius: 11px;
    background: #fff9ed;
    padding: 10px 12px;
    color: #754e14;
}
.msp-workflow-notice[hidden] { display: none; }
.msp-workflow-notice > div { display: grid; gap: 2px; margin-right: auto; }
.msp-workflow-notice strong { font-size: 12px; }
.msp-workflow-notice span { font-size: 11px; line-height: 1.4; }
.msp-workflow-notice button {
    flex: 0 0 auto;
    border: 1px solid #d5b05f;
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    color: #754e14;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.msp-workflow-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border-top: 1px solid #dbe8e9;
    background: #f7fbfb;
    padding: 14px 20px;
}
.msp-workflow-actions > button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    border: 1px solid #bad2d4;
    border-radius: 11px;
    background: #fff;
    padding: 8px 12px;
    color: #174b55;
    font: inherit;
    cursor: pointer;
}
.msp-workflow-actions > button:last-child { justify-content: flex-end; text-align: right; }
.msp-workflow-actions > button:disabled { opacity: .42; cursor: default; }
.msp-workflow-actions > button:not(:disabled):hover,
.msp-workflow-actions > button:not(:disabled):focus-visible { border-color: #168b86; box-shadow: 0 4px 14px rgba(7,127,140,.12); outline: none; }
.msp-workflow-actions > button > span:not([aria-hidden]) { display: grid; gap: 1px; }
.msp-workflow-actions small { color: #71868b; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.msp-workflow-actions strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.msp-workflow-actions > div { color: #60777d; font-size: 11px; font-weight: 750; text-align: center; white-space: nowrap; }

.msp-layout { grid-template-columns: minmax(380px, 450px) minmax(0, 1fr); }
@media(min-width:1051px) {
    .msp-controls {
        position: sticky;
        top: 12px;
        align-self: start;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}
.msp-section-heading {
    display: grid;
    gap: 2px;
    margin: 23px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dce8e9;
}
.msp-section-heading strong { color: #174b55; font-size: 14px; }
.msp-section-heading span { color: #71868b; font-size: 11px; }
.msp-section-heading--advanced { margin-top: 10px; }
.msp-section-heading--result { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.msp-backend-note {
    display: grid;
    gap: 3px;
    margin: 0 0 16px;
    border: 1px solid #d6e5e6;
    border-radius: 10px;
    background: #f5f9f9;
    padding: 10px 12px;
    color: #567078;
    font-size: 11px;
    line-height: 1.45;
}
.msp-backend-note strong { color: #315c63; }

.msp-visuals { background: #f3f7f8; }
.msp-visual-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    border: 1px solid #d4e3e4;
    border-radius: 13px;
    background: #fff;
    padding: 10px 12px;
}
.msp-visual-toolbar[hidden] { display: none; }
.msp-visual-toolbar > div:first-child { display: grid; gap: 2px; margin-right: auto; }
.msp-visual-toolbar strong { color: #173f47; font-size: 13px; }
.msp-visual-toolbar span { color: #71868b; font-size: 10px; }
.msp-visual-toolbar__buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.msp-visual-toolbar__buttons button {
    border: 1px solid #c4d8da;
    border-radius: 8px;
    background: #fff;
    padding: 7px 10px;
    color: #315c63;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.msp-visual-toolbar__buttons button[aria-pressed="true"] {
    border-color: #087f8c;
    background: #087f8c;
    color: #fff;
}
.msp-visuals > .msp-chart-card,
.msp-visuals > .msp-chart-grid { margin-bottom: 18px; }

@media(max-width:1180px) {
    .msp-projectbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .msp-projectbar__primary { grid-column: 1 / -1; }
    .msp-projecttools .msp-projectbar__actions { right: auto; left: 0; }
}
@media(max-width:900px) {
    .msp-projectbar { grid-template-columns: 1fr 1fr; }
    .msp-projectbar__type { grid-column: 1 / -1; }
    .msp-tabs {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(175px, 1fr);
        overflow-x: auto;
        padding: 0 10px;
    }
}
@media(max-width:600px) {
    
    .msp-projectbar { grid-template-columns: 1fr; }
    .msp-projectbar__type,
    .msp-projectbar__primary { grid-column: 1; }
    .msp-projectbar__primary { align-items: stretch; }
    .msp-project-save { flex: 1 1 auto; }
    .msp-projecttools { flex: 1 1 auto; }
    .msp-projecttools > summary { justify-content: center; }
    .msp-projecttools .msp-projectbar__actions { position: static; width: 100%; margin-top: 8px; grid-template-columns: 1fr; }
    .msp-mode-summary { display: grid; gap: 2px; }
    .msp-visual-toolbar { align-items: stretch; flex-direction: column; }
    .msp-visual-toolbar__buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .msp-visual-toolbar__buttons button { padding-inline: 6px; }
    .msp-workflow-notice { align-items: stretch; flex-direction: column; margin: 10px 12px 0; }
    .msp-workflow-notice button { width: 100%; }
    .msp-workflow-actions { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
    .msp-workflow-actions > div { grid-column: 1 / -1; grid-row: 1; }
    .msp-workflow-actions > button:first-child { grid-column: 1; }
    .msp-workflow-actions > button:last-child { grid-column: 2; }
}
