/* Refs #119. Page rules of 생산 (production-overview-ui.js) and 알람·작업 (alarms-ui.js) on top of insight.css,
   after mockups insight-production.html and insight-alarms.html. Long-text rules: design/wording.md §3. */
/* 첫 수신 대기 status chip (status.js awaiting_first_report): an expected wait, blue like information. */
.status-chip.status-awaiting_first_report{--chip-bg:var(--ds-color-scale-primary-100);--chip-fg:var(--ds-color-scale-primary-600);--chip-line:var(--ds-color-scale-primary-200)}
.status-summary .summary-awaiting_first_report:not(.summary-zero) b{color:var(--ds-color-scale-primary-600)}

/* Head actions that open in place: 시리얼 검색 (asset lookup form) and the lot list. */
.insight .serial-search,.insight .lot-menu{position:relative}
.insight .serial-search>summary,.insight .lot-menu>summary{list-style:none}
.insight .serial-search>summary::-webkit-details-marker,.insight .lot-menu>summary::-webkit-details-marker{display:none}
.insight .lot-menu>summary{max-width:13rem}
.insight .lot-menu>summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.insight .serial-form,.insight .lot-list{position:absolute;right:0;top:2.25rem;z-index:5;background:var(--floating);border:1px solid var(--line);border-radius:var(--i-radius);box-shadow:var(--ds-elevation-shadow-s3-value);padding:.75rem}
.insight .serial-form,.insight #asset-lookup-form.serial-form{display:flex;align-items:flex-end;gap:.5rem;width:min(22rem,calc(100vw - 2rem))}
.insight #asset-lookup-form.serial-form .btn{height:2rem;min-height:2rem}
.insight .serial-form label{display:flex;flex-direction:column;gap:.25rem;flex:1 1 0%;min-width:0;font-size:var(--ops-text-small);color:var(--muted);font-weight:700}
.insight .serial-form .btn{flex:none;width:auto;min-width:0}
.insight .serial-form input{width:100%;height:2rem;min-height:2rem;font-size:var(--ops-text-small)}
.insight .serial-search .form-error{position:absolute;right:0;top:6.5rem;z-index:5;width:min(22rem,calc(100vw - 2rem))}
.insight .lot-list{display:flex;flex-direction:column;min-width:10rem;max-width:16rem;max-height:18rem;overflow-y:auto;padding:.375rem}
.insight .lot-list a{padding:.375rem .5rem;border-radius:.25rem;color:var(--ink);text-decoration:none;font-size:var(--ops-text-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.insight .lot-list a[aria-current=true]{font-weight:700;background:var(--surface)}

/* 알람 table spans the card edge to edge. */
.insight .alarm-card{padding:0}
.insight .alarm-card table.t th:first-child,.insight .alarm-card table.t td:first-child{padding-left:1rem}
.insight .alarm-card .note{padding:0 1rem .875rem}
.insight .alarm-card .err,.insight .alarm-card .empty{margin:1rem}
.insight .alarm-card .err+table.t{margin-top:0}
.insight td.what b.clamp2{font-weight:700}
.insight td.who-c .site.who{color:inherit;font-size:var(--ops-text-small);max-width:10rem}
.insight b.rule-name{white-space:nowrap}

/* 현장 작업 지시: title + one line of who/when, then the four-step strip. */
.insight table.wo{table-layout:fixed}
.insight table.wo td.wo-what{width:45%;min-width:0}
.insight table.wo .wo-title{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:73.75rem){.insight td.who-c .site.who{max-width:6.25rem}}
@media(max-width:47.5rem){
 .insight table.wo,.insight table.wo tbody,.insight table.wo tr,.insight table.wo td,.insight table.wo td.wo-what{display:block;width:auto}
 .insight table.wo tr{padding:.5rem 0;border-bottom:1px solid var(--line)}.insight table.wo tr:last-child{border-bottom:0}
 .insight table.wo td{border:0;padding:.125rem 0}
 .insight td.who-c .site.who{max-width:none}
 .insight .serial-form,.insight .lot-list{right:auto;left:0}
 .insight .serial-search .form-error{right:auto;left:0}
}

/* Refs #236. 생산 > 생산하기 (production-station-ui.js): the PC production program's work screen inside Ops. */
.station-page [hidden]{display:none!important}
.station-page .st-work>*+*{margin-top:.75rem}
.station-page .st-grid{display:grid;grid-template-columns:minmax(18rem,26rem) minmax(0,1fr);gap:.75rem;align-items:start}
.station-page .st-col{display:grid;gap:.75rem;min-width:0}
.station-page .st-col .card+.card,.station-page .st-grid>.card{margin-top:0}
.station-page .card h2{margin-bottom:.625rem}
.station-page .card h3{margin:1rem 0 .5rem;font-size:var(--ops-text-body);color:var(--strong)}
.station-page .card p{font-size:var(--ops-text-body);line-height:1.25rem;margin:.375rem 0}
.station-page .st-form .field{margin-bottom:.625rem}
.station-page .st-form input:not([type=checkbox]),.station-page .st-form select,.station-page .st-form textarea,.station-page .st-search{width:100%}
.station-page .st-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}
.station-page .st-box{padding:.625rem .75rem;background:var(--surface);border:1px solid var(--line);border-radius:var(--i-radius);font-size:var(--ops-text-body);line-height:1.25rem;white-space:pre-wrap;overflow-wrap:anywhere}
.station-page .st-box.ok{background:var(--i-ok-bg);border-color:var(--i-ok-line);color:var(--i-ok-ink)}
.station-page .st-box.waiting{background:var(--i-warn-bg);border-color:var(--i-warn-line);color:var(--i-warn-ink)}
.station-page .st-kv{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.375rem .75rem;margin:.625rem 0;font-size:var(--ops-text-small)}
.station-page .st-kv dt{color:var(--muted)}
.station-page .st-kv dd{margin:0;overflow-wrap:anywhere}
.station-page .st-status-line{display:flex;align-items:center;gap:.625rem;flex-wrap:wrap}
.station-page .st-status-text{flex:1 1 16rem;min-width:0;font-size:var(--ops-text-small);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.station-page .st-status-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.station-page .st-banner{display:flex;gap:.75rem;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:.75rem 1rem;border:1px solid var(--i-warn-line);background:var(--i-warn-bg);color:var(--i-warn-ink);border-radius:var(--i-radius)}
.station-page .st-banner b{color:var(--strong)}
.station-page .st-banner p{margin:.25rem 0 0;font-size:var(--ops-text-body);line-height:1.25rem}
.station-page .st-next{font-weight:700;color:var(--strong)}
.station-page .st-next-step{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;padding:.625rem .75rem;border:1px solid var(--i-ok-line);background:var(--i-ok-bg);border-radius:var(--i-radius);margin:.5rem 0}
.station-page .st-next-step p{margin:0;color:var(--i-ok-ink);font-weight:700}
/* Refs #272 R1: the selected board (number·chip), its step bar and one full-width result band. */
.station-page .st-account{font-size:var(--ops-text-small);font-weight:700;color:var(--strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.station-page .st-current{display:grid;gap:.625rem}
.station-page .st-board-head{display:flex;gap:.5rem 1rem;align-items:baseline;flex-wrap:wrap}
.station-page .st-board-head b{font-size:1.125rem;color:var(--strong);overflow-wrap:anywhere}
.station-page .st-board-head span{font-size:var(--ops-text-small);color:var(--muted)}
.station-page .st-stepbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.25rem;margin:0;padding:0;list-style:none}
.station-page .st-step{display:grid;gap:.125rem;padding:.5rem .625rem;border:1px solid var(--line);border-radius:var(--i-radius);background:var(--surface);min-width:0}
.station-page .st-step span{font-size:var(--ops-text-small);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.station-page .st-step small{font-size:var(--ops-text-small);color:var(--muted)}
.station-page .st-step.done{background:var(--i-ok-bg);border-color:var(--i-ok-line);color:var(--i-ok-ink)}
.station-page .st-step.current{background:var(--i-info-bg);border-color:var(--i-info-ink);color:var(--i-info-ink);box-shadow:inset 0 0 0 1px var(--i-info-ink)}
.station-page .st-step.failed{background:var(--i-crit-bg);border-color:var(--i-crit-line);color:var(--i-crit-ink)}
.station-page .st-step.todo{color:var(--muted)}
.station-page .st-band{display:flex;gap:.75rem;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:.75rem 1rem;border:1px solid var(--line);border-radius:var(--i-radius);background:var(--surface)}
.station-page .st-band-text{display:grid;gap:.125rem;flex:1 1 18rem;min-width:0}
.station-page .st-band-text b{font-size:var(--ops-text-result);line-height:2rem}
.station-page .st-band-text span{font-size:var(--ops-text-body);line-height:1.25rem;overflow-wrap:anywhere}
.station-page .st-band.ok{background:var(--i-ok-bg);border-color:var(--i-ok-line);color:var(--i-ok-ink)}
.station-page .st-band.crit{background:var(--i-crit-bg);border-color:var(--i-crit-line);color:var(--i-crit-ink)}
.station-page .st-band.progress{background:var(--i-info-bg);border-color:var(--i-info-bg);color:var(--i-info-ink)}
.station-page .st-band-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.station-page .st-banner.crit{border-color:var(--i-crit-line);background:var(--i-crit-bg);color:var(--i-crit-ink)}
.station-page .st-power-confirm{font-weight:700;color:var(--strong)}
.station-page .st-manual{margin:.5rem 0;font-size:var(--ops-text-small)}
.station-page .st-manual summary{cursor:pointer;color:var(--muted)}
@media (max-width:640px){.station-page .st-stepbar{grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr))}}
.station-page table.t td.st-evidence{overflow-wrap:anywhere;min-width:12rem}
.station-page table.t tr[data-station-record]{cursor:pointer}
.station-page .st-empty-row{color:var(--muted);text-align:center}
.station-page .st-pane{max-width:44rem}
.station-page .st-steps{margin:.5rem 0;padding-left:1.25rem;font-size:var(--ops-text-body);line-height:1.5rem}
.station-page .st-pane-actions{margin:.75rem 0}
.station-page .st-port{margin-top:.75rem;font-size:var(--ops-text-small)}
.station-page .st-inline{display:flex;align-items:flex-end;gap:.5rem;margin-top:.5rem}
.station-page .st-inline .field{margin:0;width:8rem}
.station-page #st-saved,.station-page #st-live-actions{font-size:var(--ops-text-small);line-height:1.25rem;padding-left:1.25rem}
.station-page .st-tabs{margin:0}
.station-page .st-tabs button{padding:.5rem .75rem;color:var(--muted);background:none;border:0;border-bottom:2px solid transparent;font:inherit;font-weight:700;font-size:var(--ops-text-small);white-space:nowrap;cursor:pointer}
.station-page .st-tabs button.on{color:var(--strong);border-color:var(--strong)}
.station-page .st-next-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.station-page .st-outbox{list-style:none;margin:0;padding:0;font-size:var(--ops-text-small);line-height:1.25rem}
.station-page .st-outbox li{padding:.375rem 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.station-page .st-outbox li:last-child{border-bottom:0}
.station-page table.t tr[data-station-pack]{cursor:pointer}
.station-page table.t tr[data-station-pack].on{background:var(--surface)}
.station-page table.t tr[data-station-pack] td{overflow-wrap:anywhere}
/* Refs #272 R2 R3. 포장·라벨 상자 1개: 관리번호 32 px (ux-by-user.md 4.3), 체크리스트, 출하 대기. */
.station-page .st-box-head{display:flex;gap:.25rem 1rem;align-items:baseline;flex-wrap:wrap}
.station-page .st-asset-no{font-size:var(--ops-text-asset);line-height:2.5rem;color:var(--strong);overflow-wrap:anywhere}
.station-page .st-box-now{font-size:var(--ops-text-body);font-weight:700;color:var(--strong)}
.station-page #st-pk-form-fold>summary{cursor:pointer;list-style-position:inside}
.station-page #st-pk-form-fold>summary h2{display:inline}
.station-page .st-check-list{list-style:none;margin:0;padding:0;display:grid;gap:.25rem}
.station-page .st-check-list .field{margin:0;font-size:var(--ops-text-body)}
.station-page .st-check-list small.note{display:block;margin-left:1.5rem;color:var(--muted)}
.station-page .ship-card{margin-top:.75rem}
.station-page .ship-actions{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.station-page .ship-actions .field{margin:0}
.station-page .ship-confirm{margin:.75rem 0}
.station-page .ship-confirm input{width:100%}
.station-page .ship-card td small{display:block;font-size:var(--ops-text-small);color:var(--muted);overflow-wrap:anywhere}
.station-page .ship-card td .form-error{font-size:var(--ops-text-small);overflow-wrap:anywhere}
@media(max-width:60rem){.station-page .st-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:47.5rem){.station-page .st-pair{grid-template-columns:minmax(0,1fr)}}
/* Refs #319. Production search and its error/result stay in normal document flow. */
.production-search{margin:0 0 1rem;padding:1rem 0;border-bottom:1px solid var(--line)}
.production-search-form{display:flex;align-items:end;gap:.75rem;max-width:38rem}.production-search-form label{display:flex;flex:1;min-width:0;flex-direction:column;gap:.5rem}.production-search-form input{width:100%;min-width:0}.production-search .form-error{position:static;margin-top:.5rem}.production-search #production-search-results:not(:empty){margin-top:1rem}.board-chip{display:block;font-size:var(--ops-text-small);overflow-wrap:anywhere}
@media(max-width:32rem){.production-search-form{flex-direction:column;align-items:stretch}}

/* Refs #422. 관찰 대수 설명은 모바일 숫자 칸에서도 줄바꿈한다. */
.insight.production-page table.t td.n .age{white-space:normal}

/* Refs #272 R9. Text and target size floors: design/ux-by-user.md 4.3, app/README.md "글자·버튼 크기".
   Last in the cascade on purpose so the floors win over older per-screen heights. Tokens: vendor/design-system/tokens.adapter.css. */
body{font-size:var(--ops-text-body)}
small{font-size:var(--ops-text-small)}
p.sub,.notice,.empty-panel p,.route-state,.error-message,#feedback,.editor-form .sub,.insight .err p{font-size:var(--ops-text-body)}
button,.button,input,select,textarea,.insight .btn,.insight .btn.small{font-size:var(--ops-text-body)}
:is(button,.button,.btn,select,input:not([type=checkbox],[type=radio],[type=range],[type=hidden])){min-height:var(--ops-target-desktop)!important}
.station-page :is(button,.button,.btn,select,input:not([type=checkbox],[type=radio],[type=range],[type=hidden])){min-height:var(--ops-target-touch)!important}
input[type=checkbox],input[type=radio]{min-width:1.25rem;min-height:1.25rem}
@media(max-width:48rem){:is(button,.button,.btn,select,input:not([type=checkbox],[type=radio],[type=range],[type=hidden])){min-height:var(--ops-target-touch)!important}.asset-toolbar,.form-actions,.toolbar,.page-head>.toolbar,.st-band-actions,.st-next-actions,.st-status-actions,.st-pane-actions,.ship-actions{gap:var(--ops-target-gap)}}
/* #272 M2 M4 M5 H6 M3: 생산하기 burn card under the status line, band forms, folded 포장·라벨 parts, field lines, 합격 확정 dialog. */
.station-page .st-flash-top{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.station-page .st-flash-image{display:grid;gap:.125rem;margin:0;min-width:0}
.station-page .st-flash-image b{overflow-wrap:anywhere}
.station-page .st-flash-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:0 .625rem;margin-top:.5rem}
.station-page .st-flash .note{margin:.25rem 0}
.station-page .st-more{margin:.5rem 0}
.station-page .st-more>summary,.station-page details.st-fold>summary{cursor:pointer;color:var(--muted)}
.station-page details.st-fold>summary h2,.station-page .card>details>summary h2{display:inline;margin:0}
.station-page details.st-fold{margin-top:.5rem}
.station-page #st-band-forms .st-band-form{margin-top:.75rem;padding:.75rem 1rem;border:1px solid var(--line);border-radius:var(--i-radius);background:var(--surface)}
.station-page .st-pk-steps{display:grid;gap:.5rem;max-width:60rem;margin-top:.5rem}
.station-page .st-pk-steps>.card{margin-top:0}
.station-page .st-field-line{margin:-.375rem 0 .625rem}
.station-page .st-field-line:empty{display:none}
.station-page .st-dialog{max-width:32rem;border:1px solid var(--line);border-radius:var(--i-radius);padding:1rem 1.25rem;background:var(--surface);color:var(--ink)}
.station-page .st-phone p{margin:0}
.production-page .steps a.s-link:hover,.production-page .steps a.s-link:focus-visible{border-color:var(--strong)}
.station-page #st-pk-board:empty,.station-page #st-pk-notice:empty{display:none}
