/* CREDIT UNDERWRITING: the request list, a new request and a request's steps (views/underwriting/view.js). Built from
   the kit's parts (.vx-card/.vx-panel, .vx-field, .vx-select-native, .vx-check, .vx-btn, .vx-seg, .vx-chip, .vx-pill,
   .vx-bubble, .vx-eyebrow, .vx-label, .vx-help). What is left here is layout and the view's own small parts (the
   request card, the product cards, the step strip's number, document cards, sections, facts, the table), on the kit's
   tokens only. Phone first; wider screens get two-column field grids. */

/* The screens' panels, one under the other. */
.uw-panel{margin-block-start:var(--vx-sp-4)}
.uw-k{margin-block-start:var(--vx-sp-2)}
.uw-k:first-child{margin-block-start:0}
.uw-note{margin:0}

/* The list. */
.uw-counts{margin:var(--vx-sp-1) 0 0}
.uw-counts:empty{display:none}
/* The requests as the kit's rows in one card: number, applicant, product and amount, the status at the end. */
.uw-cases{padding-inline:var(--vx-sp-4)}
.uw-case-card{padding-inline:0}
.uw-case-card>span>.uw-case-name{color:var(--vx-ink);white-space:normal;overflow-wrap:anywhere}
.uw-doc{display:grid;gap:var(--vx-sp-1);width:100%;padding:var(--vx-sp-3h);border:1px solid var(--vx-hair);border-radius:var(--vx-r-sm);background:var(--vx-well);color:var(--vx-ink);font-size:var(--vx-fs-8)}
.uw-doc>small{color:var(--vx-ink-3);overflow-wrap:anywhere}
.uw-case-top{display:flex;align-items:center;justify-content:space-between;gap:var(--vx-sp-2);min-width:0}
.uw-case-top>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uw-case-name{overflow-wrap:anywhere}

/* A new request: the four products, the fields. */
.uw-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--vx-sp-2)}
.uw-product{min-width:0;padding:var(--vx-sp-3)}
.uw-form>.uw-k:not(:first-child){margin-block-start:var(--vx-sp-3)}
.uw-form>button[type="button"]{justify-self:start}
.uw-field{display:grid;gap:var(--vx-sp-2);align-content:start;min-width:0}
.uw-field>select{width:100%}
.uw-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--vx-sp-2h)}
.uw-check{display:flex;align-items:flex-start;gap:var(--vx-sp-2h);margin:var(--vx-sp-2) 0 var(--vx-sp-1);font-size:var(--vx-fs-7);line-height:1.4;color:var(--vx-ink)}

/* A request: the header, the stages, the step strip. */
.uw-case-head{gap:var(--vx-sp-1h)}
/* Four one-word stages and their ticks share a narrow phone: they shrink rather than push the page sideways, and a
   tick drops under its word when there is no room beside it. */
.uw-stages{display:grid;grid-auto-columns:minmax(0,1fr);margin-block-start:var(--vx-sp-4)}
#uwStages>button{min-width:0;white-space:normal;padding-inline:var(--vx-sp-0h)}
.uw-done{width:14px;height:14px;margin-inline-start:var(--vx-sp-1);vertical-align:-2px;color:var(--vx-success-text)}
.uw-steps{display:flex;flex-wrap:wrap;gap:var(--vx-sp-1h);margin-top:var(--vx-sp-2h)}
.uw-chip{max-width:100%;padding-inline:var(--vx-sp-1h) var(--vx-sp-3)}
.uw-chip>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uw-chip-n{display:grid;flex:none;place-items:center;width:22px;height:22px;border-radius:var(--vx-r-round);background:var(--vx-well);font-size:var(--vx-fs-2)}
.uw-chip-n .icon{width:13px;height:13px}
.uw-chip.is-done:not(.is-current) .uw-chip-n{color:var(--vx-success-text)}
/* The step in front: its disc turns over with the chip (the chip's on colours swapped), so the number shows in every mode. */
.uw-chip[aria-selected="true"] .uw-chip-n{background:var(--vx-chip-on-fg);color:var(--vx-chip-on-bg)}

/* The step. */
.uw-step-title{margin:0;font-size:var(--vx-fs-title-sm);line-height:1.3}
.uw-step-body{display:grid;gap:var(--vx-sp-2h);min-width:0}
.uw-step-body>.uw-k:not(:first-child){margin-block-start:var(--vx-sp-2h)}
#uwStepMessage:empty{display:none}
.uw-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--vx-sp-2)}
.uw-verify{display:grid;gap:var(--vx-sp-2);margin-top:var(--vx-sp-2);padding-top:var(--vx-sp-3h);border-top:1px solid var(--vx-hair)}
#uwVerifyBtn{justify-self:end}
.uw-verify>small{color:var(--vx-ink-3)}
.uw-section{border:1px solid var(--vx-hair);border-radius:var(--vx-r-sm);background:var(--vx-well)}
.uw-section>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--vx-sp-2h);min-height:48px;padding:var(--vx-sp-2h) var(--vx-sp-3);font-size:var(--vx-fs-8);font-weight:600;cursor:pointer;list-style:none}
.uw-section>summary::-webkit-details-marker{display:none}
.uw-section>summary small{flex:none;color:var(--vx-ink-3);font-weight:500}
.uw-section[open]>summary{border-bottom:1px solid var(--vx-hair)}
.uw-section>.uw-grid{padding:var(--vx-sp-3)}
.uw-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--vx-sp-3)}
.uw-src{display:block;color:var(--vx-ink-3);font-size:var(--vx-fs-4);line-height:1.35;overflow-wrap:anywhere}
.uw-list{display:grid;gap:var(--vx-sp-1h);margin:0;padding:0;list-style:none}
.uw-list li{display:flex;align-items:center;justify-content:space-between;gap:var(--vx-sp-2h);font-size:var(--vx-fs-8)}
.uw-bullets{margin:0;padding-inline-start:var(--vx-sp-5);font-size:var(--vx-fs-8);line-height:1.5}
.uw-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--vx-sp-2);margin:0}
.uw-facts>div{min-width:0;padding:var(--vx-sp-2h);border-radius:var(--vx-r-xs);background:var(--vx-well)}
.uw-facts dt{color:var(--vx-ink-3);font-size:var(--vx-fs-4)}
.uw-facts dd{margin:var(--vx-sp-0h) 0 0;font-size:var(--vx-fs-10);font-weight:600;overflow-wrap:anywhere}
.uw-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.uw-table{width:100%;min-width:480px;border-collapse:collapse;font-size:var(--vx-fs-6)}
.uw-table th{padding:var(--vx-sp-1h) var(--vx-sp-2);color:var(--vx-ink-3);font-weight:600;text-align:start;white-space:nowrap}
.uw-table td{padding:var(--vx-sp-2);border-top:1px solid var(--vx-hair);vertical-align:top;overflow-wrap:anywhere}
.uw-email{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--vx-sp-2);align-items:end}
.uw-email>label{grid-column:1/-1}

/* AI text, the citations, the AI Underwriter. */
.uw-ai-text{padding:var(--vx-sp-3);border-radius:var(--vx-r-sm);background:var(--vx-well);font-size:var(--vx-fs-8);line-height:1.55;overflow-wrap:anywhere}
.uw-ai-text p{margin:0}
.uw-ai-text p+p{margin-top:var(--vx-sp-2h)}
.uw-cites{display:flex;flex-wrap:wrap;gap:var(--vx-sp-1h);margin-top:var(--vx-sp-2)}
.uw-cites>span{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.uw-ai-log{display:grid;gap:var(--vx-sp-2)}
.uw-ai-log:empty{display:none}
.uw-msg{max-width:100%;overflow-wrap:anywhere}
.uw-msg-q{justify-self:end}
.uw-ai-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--vx-sp-2);align-items:end}
.uw-ai-form textarea{min-height:44px}

@media (min-width:700px){
  .uw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uw-products{grid-template-columns:repeat(4,minmax(0,1fr))}
  .uw-facts{grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* A new underwriting request is one long form: its panels stop at a form's width (from desktop.css). */
body.desk #uwNewScreen>.uw-panel{max-width:820px}
