/* MillFlow guided interaction primitives.
   A person should make one decision at a time; technical form fields remain behind the UI. */
#app .layout .mf-gw{background:#fff;border:1px solid #d9e7f1;border-radius:16px;overflow:hidden;box-shadow:0 14px 34px #102d470d;margin:0 0 20px}
#app .layout .mf-gw-head{padding:23px clamp(16px,3vw,30px) 20px;background:linear-gradient(130deg,#113755,#174969);color:#edf7ff;display:grid;gap:20px}
#app .layout .mf-gw-head>div:first-child>small{font-size:10px;letter-spacing:.14em;color:#b8d6e7;font-weight:850}
#app .layout .mf-gw-head h3{font-size:clamp(20px,2.2vw,26px);color:#fff;margin:6px 0 8px}
#app .layout .mf-gw-head p{font-size:12px;line-height:1.6;color:#c3dbea;margin:0}
#app .layout .mf-gw-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#app .layout .mf-gw-steps>span{display:flex;align-items:center;gap:9px;color:#a3bed1;font-weight:800;font-size:11px;border-top:2px solid #427390;padding-top:13px;min-width:0}
#app .layout .mf-gw-steps>span b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#315d7a;color:#d6e8f4}
#app .layout .mf-gw-steps>span.active{color:#fff;border-color:#e4be86}
#app .layout .mf-gw-steps>span.active b{background:#e4be86;color:#153d56}
#app .layout .mf-gw-form{padding:clamp(16px,2.8vw,30px)}
#app .layout .mf-gw-step{display:grid;gap:19px;max-width:970px;margin:auto}
#app .layout .mf-gw-step[hidden],#app .layout .mf-gw-time-edit[hidden]{display:none!important}
#app .layout .mf-gw-question{display:grid;gap:6px}
#app .layout .mf-gw-question small{color:#ab8355;font-size:10px;letter-spacing:.13em;font-weight:900}
#app .layout .mf-gw-question h4{font-size:clamp(18px,2vw,23px);line-height:1.3;color:#153e5b;margin:0}
#app .layout .mf-gw-question p{font-size:12px;color:#718b9b;line-height:1.6;margin:0}
#app .layout .mf-gw-question.smaller{padding-top:7px}
#app .layout .mf-gw-question.smaller h4{font-size:15px}
#app .layout .mf-gw-choices{display:flex;flex-wrap:wrap;gap:9px}
#app .layout .mf-gw-choice{display:inline-flex;gap:8px;align-items:center;justify-content:center;text-align:center;min-height:45px;padding:12px 17px;border:1px solid #d2e2ed;border-radius:10px;background:#f7fafc;color:#375e78;font-size:12px;font-weight:800;cursor:pointer;transition:background .12s,border .12s,transform .12s;white-space:normal}
#app .layout .mf-gw-choice>span{font-size:21px;line-height:1}
#app .layout .mf-gw-choice:hover{border-color:#8ab9d4;background:#eaf5fc}
#app .layout .mf-gw-choice.is-selected{background:#1e5478;border-color:#1e5478;color:#fff;box-shadow:0 5px 15px #18537b23}
#app .layout .mf-gw-choice:focus-visible,#app .layout .mf-gw-counter-actions button:focus-visible,#app .layout .mf-gw-details-button:focus-visible{outline:3px solid #63b5e1;outline-offset:3px}
#app .layout .mf-gw-types{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
#app .layout .mf-gw-types .mf-gw-choice{min-height:76px;flex-direction:column}
#app .layout .mf-gw-field{display:grid;gap:8px;max-width:680px}
#app .layout .mf-gw-field>span{font-size:12px;font-weight:850;color:#305772}
#app .layout .mf-gw-field>span small{color:#839bab;font-weight:500}
#app .layout .mf-gw-field input,#app .layout .mf-gw-field textarea,#app .layout .mf-gw-time-edit input{box-sizing:border-box;width:100%;min-height:47px;border:1px solid #cddfea;border-radius:10px;padding:12px 13px;background:#fff;color:#153f5b;font-size:15px}
#app .layout .mf-gw-field textarea{line-height:1.5;resize:vertical}
#app .layout .mf-gw-preview{border-left:3px solid #a7bc80;background:#f0f7f3;padding:13px 16px;border-radius:8px;color:#32634f;font-size:12px;line-height:1.5;font-weight:750}
#app .layout .mf-gw-details-button{background:transparent;border:0;color:#236797;cursor:pointer;min-height:35px;padding:0;text-decoration:underline;text-underline-offset:4px;text-align:left;width:max-content;font-size:12px;font-weight:750}
#app .layout .mf-gw-time-edit{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px;border-radius:12px;background:#f5f8fb;border:1px solid #dae7ef}
#app .layout .mf-gw-time-edit label{display:grid;gap:7px;font-size:12px;font-weight:750;color:#3a627d}
#app .layout .mf-gw-time-edit>small{grid-column:1/-1;font-size:10px;color:#688599;line-height:1.5}
#app .layout .mf-gw-actions{border-top:1px solid #e5eef4;margin-top:6px;padding-top:20px;display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}
#app .layout .mf-gw-actions .btn{min-height:48px;padding:12px 19px;border-radius:9px;font-size:12px}
#app .layout .mf-gw-crew-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
#app .layout .mf-gw-crew-grid>section{border:1px solid #dce8ef;border-radius:12px;padding:15px;display:grid;gap:13px;background:#fbfdff}
#app .layout .mf-gw-crew-grid h5{font-size:14px;color:#264c68;margin:0}
#app .layout .mf-gw-counter{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
#app .layout .mf-gw-counter>div:first-child{display:grid;gap:4px}
#app .layout .mf-gw-counter b{font-size:12px;color:#365c75}
#app .layout .mf-gw-counter small{font-size:10px;color:#8299aa}
#app .layout .mf-gw-counter-actions{display:flex;align-items:center;gap:2px;background:#edf5f9;border-radius:10px;padding:3px}
#app .layout .mf-gw-counter-actions button{border:0;background:#fff;border-radius:8px;width:36px;height:38px;font-weight:900;font-size:17px;color:#26608a;cursor:pointer}
#app .layout .mf-gw-counter-actions input{box-sizing:border-box;width:49px;border:0;background:transparent;text-align:center;font-weight:850;font-size:16px;color:#174463;padding:0;appearance:textfield}
#app .layout .mf-gw-counter-actions input::-webkit-outer-spin-button,#app .layout .mf-gw-counter-actions input::-webkit-inner-spin-button{appearance:none;margin:0}
#app .layout .mf-gw-parts .mf-gw-choice{min-height:48px}
#app .layout .mf-gw-sr{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
#app .layout .mf-gw-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#app .layout .mf-gw-checks>label{box-sizing:border-box;display:flex;gap:10px;align-items:center;cursor:pointer;padding:15px 13px;border:1px solid #d6e3ec;border-radius:12px;min-height:90px;background:#f8fbfd}
#app .layout .mf-gw-checks>label:has(input:checked){background:#eff8f3;border-color:#9ec5a9}
#app .layout .mf-gw-checks input{flex:0 0 20px;width:20px;height:20px;accent-color:#338d69;margin:0}
#app .layout .mf-gw-checks label>span{display:grid;gap:6px}
#app .layout .mf-gw-checks b{font-size:12px;color:#26506c}
#app .layout .mf-gw-checks small{font-size:10px;color:#708d9d;line-height:1.45}
#app .layout .mf-gw-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#app .layout .mf-gw-summary>div{min-height:64px;border-radius:10px;background:#f3f7fa;padding:12px;display:grid;align-content:center;gap:7px;min-width:0}
#app .layout .mf-gw-summary small{font-size:9px;font-weight:850;letter-spacing:.05em;text-transform:uppercase;color:#7b95a7}
#app .layout .mf-gw-summary strong{font-size:12px;font-weight:800;line-height:1.5;overflow-wrap:anywhere;color:#214c6b}
#app .layout .mf-gw-caution{font-size:11px;line-height:1.6;color:#766648;background:#fff9ec;border:1px solid #f0e0b7;border-radius:9px;padding:13px 15px;margin:0}
#app .layout .mf-gw-error{border-radius:9px;background:#fff5ec;border:1px solid #ebc6a9;color:#a2512b;padding:11px 15px;font-size:12px}
#app .layout .mf-guide-prompt{border:1px dashed #b6d1e2;border-radius:12px;padding:25px;background:#f5fafe;text-align:center;margin:0 0 20px;color:#2b5774}
#app .layout .mf-guide-prompt b{font-size:15px}
#app .layout .mf-guide-prompt p{font-size:12px;color:#7690a2;line-height:1.6;margin:6px 0 0}
#app .layout .mf-guide-other{border:1px solid #d8e7f0;border-radius:12px;background:#fff;margin-top:16px}
#app .layout .mf-guide-other>summary{padding:17px 20px;cursor:pointer;color:#2b6386;font-weight:800;font-size:12px}
#app .layout .mf-guide-other>div{padding:0 18px 18px}
@media(max-width:840px){#app .layout .mf-gw-choices.mf-gw-types{grid-template-columns:repeat(2,minmax(0,1fr))}#app .layout .mf-gw-crew-grid{grid-template-columns:1fr}#app .layout .mf-gw-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#app .layout .mf-gw-head{padding:19px 17px}#app .layout .mf-gw-form{padding:15px}#app .layout .mf-gw-steps>span{font-size:10px;gap:4px}#app .layout .mf-gw-steps>span b{width:21px;height:21px}#app .layout .mf-gw-choice{padding:10px 12px;font-size:11px}#app .layout .mf-gw-checks{grid-template-columns:1fr}#app .layout .mf-gw-checks>label{min-height:65px}#app .layout .mf-gw-time-edit{grid-template-columns:1fr}#app .layout .mf-gw-actions>.btn{flex:1 1 135px}}
@media(prefers-reduced-motion:reduce){#app .layout .mf-gw-choice{transition:none}}

/* Saved work stays scannable; drill into the existing authorized actions. */
#app .layout .mf-gw-saved-window{display:grid;gap:0;padding:0!important;overflow:hidden;border-radius:12px;margin:0 0 12px}
#app .layout .mf-gw-saved-window>.prod-card-head{padding:15px 18px;gap:12px}
#app .layout .mf-gw-saved-window .prod-card-head b{font-size:13px;color:#234c68}
#app .layout .mf-gw-saved-window .prod-card-head small{font-size:11px;color:#6e8a9d}
#app .layout .mf-gw-window-detail>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:43px;box-sizing:border-box;padding:10px 18px;background:#f2f8fc;color:#28658c;font-size:12px;font-weight:850;cursor:pointer;list-style:none;border-top:1px solid #e0edf5}
#app .layout .mf-gw-window-detail>summary::-webkit-details-marker{display:none}
#app .layout .mf-gw-window-detail>summary b{font-size:17px;transition:transform .12s}
#app .layout .mf-gw-window-detail[open]>summary b{transform:rotate(90deg)}
#app .layout .mf-gw-window-detail>summary:focus-visible{outline:3px solid #64b6df;outline-offset:-4px}
#app .layout .mf-gw-window-content{padding:15px 18px;display:grid;gap:12px}
#app .layout .mf-gw-window-content>p{font-size:11px;color:#57778b;line-height:1.6;margin:0}
#app .layout .mf-gw-window-content .prod-shutdown-prep{border-radius:10px;border:1px solid #dae8f1;background:#f9fbfd;padding:13px}
#app .layout .mf-gw-window-content .prod-shutdown-prep>summary{cursor:pointer;color:#215979;font-weight:850;font-size:12px}

/* Reuse the same reveal-on-intent principle for planner creation tools. */
#app .layout .mf-gw-create-task{border:1px solid #d7e6f0;border-radius:12px;background:#fff;margin:0 0 16px;overflow:hidden}
#app .layout .mf-gw-create-task>summary{box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:53px;padding:16px 18px;cursor:pointer;list-style:none;background:#f4f9fc;color:#245f84;font-size:12px;font-weight:850}
#app .layout .mf-gw-create-task>summary span{color:#718c9e;font-weight:500}
#app .layout .mf-gw-create-task>summary::-webkit-details-marker{display:none}
#app .layout .mf-gw-create-task>summary:focus-visible{outline:3px solid #67bce0;outline-offset:-4px}
#app .layout .mf-gw-create-task[open]>summary{background:#e9f5fb;border-bottom:1px solid #d8e7ef}
#app .layout .mf-gw-create-task>form{padding:16px}
@media(max-width:600px){#app .layout .mf-gw-create-task>summary span{display:none}}
