/* Southport Signal: w7-company.css (created by S0, owned by S2 (the company case: web/src/views/company.js)).
 *
 * Page rules for the case page: the full case, the back bar, the sticky call bar.
 * Everything shared (rows, kickers, the call block, the case, the sheet, sample
 * marks, freshness, the one-line notes) lives in w7.css and is not repeated here.
 * Tokens only (web/styles/tokens.css); no shadows on panels; the phone number
 * stays the largest text on every call block; nothing a rep reads on a phone
 * under 12px. Prefix every class w7 and the page's own letter, so the page's
 * rules never collide with the kit's or another page's. */

/* ------------------------------------------------------------ the page (S2) */
.w7c-page{container:w7cpage / inline-size;min-width:0;max-width:1480px;font-family:var(--font-ui);color:var(--ink)}

/* The back link. On a phone it reads as the case's back bar ("‹ Today"); on a
   desk it is a breadcrumb with the kicker ("‹ TODAY / COMPANY CASE · 5 RECORDS"),
   and the header's own kicker line steps aside so the words are said once. */
.w7c-crumb{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:0 0 2px}
.w7c-back{display:inline-flex;align-items:center;gap:4px;min-height:44px;margin-left:-6px;padding:0 6px;
  color:var(--ink);font-size:17px;font-weight:650;text-decoration:none;border-radius:8px}
.w7c-back .w7i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.w7c-back:hover{background:var(--surface-2)}
.w7c-back:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.w7c-ck{display:none}
.w7c-ck i{font-style:normal;color:var(--line2);margin-right:10px}

@container w7cpage (min-width:1060px){
  .w7c-crumb{margin:0 0 4px}
  .w7c-back,.w7c-ck{font-size:12.5px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--mute);min-height:28px}
  .w7c-back .w7i{width:15px;height:15px}
  .w7c-ck{display:inline-flex;align-items:center}
  .w7c-page .w7case:not(.w7compact) .w7ch>.w7kicker{display:none}
  .w7c-page .w7case:not(.w7compact) h1.w7cname{margin-top:2px}
  .w7c-page .w7case:not(.w7compact) .w7ch .w7ch-acts{padding-top:6px;grid-row:1 / span 3}
}

/* The desk case is dense by design: DISPLAY §4.4 holds the richest family to
   one screen of who, why and what they run and to 1,800px overall. */
@container w7cpage (min-width:1060px){
  .w7c-page .w7csec{margin-top:16px}
  .w7c-page .w7ch .w7sum{margin-top:10px}
  .w7c-page .w7evl{padding:7px 0}
  .w7c-page .w7s-cur{grid-column:1 / -1}
  /* The header takes the width the actions leave; the summary stays readable. */
  .w7c-page .w7case:not(.w7compact) .w7ch{grid-template-columns:minmax(0,1fr) auto}
  .w7c-page .w7case:not(.w7compact) .w7ch .w7sum{max-width:880px}
  .w7c-page .w7ch .w7legend-sample{margin-top:10px;max-width:880px}
  .w7c-page .w7case:not(.w7compact) .w7cbody{margin-top:12px}
}

.w7c-page .w7c-torecs{display:none}
@container w7cpage (min-width:1060px){.w7c-page .w7ch-acts .w7c-torecs{display:inline-flex}}

/* The dealer's own history is part of the case, not an obscure tab. */
.w7c-history{display:inline-flex;align-items:center;min-height:44px;margin:8px 0 14px;padding:10px 14px;
  border:1px solid var(--line);border-radius:9px;background:var(--surface-2);font-size:14px}
.w7c-history:hover{border-color:var(--blue);background:var(--card)}
.w7c-history:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

/* The case remains the lead, while the record's everyday CRM work has a visible
   route into its existing tabs and controls. */
.w7c-crmrail{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:8px 0 14px;padding:9px 11px;
  border:1px solid var(--line);border-left:3px solid var(--found);border-radius:10px;background:var(--surface-2)}
.w7c-crmlabel{margin-right:4px;color:var(--mute);font-size:11.5px;font-weight:750;letter-spacing:.06em;text-transform:uppercase}
.w7c-crmrail .w7c-crmlink{display:inline-flex;align-items:center;justify-content:center;min-height:36px;margin:0;padding:6px 10px;
  border:1px solid var(--line);border-radius:7px;background:var(--card);color:var(--ink);font:650 13px/1.25 var(--font-ui);
  text-decoration:none;cursor:pointer}
.w7c-crmrail .w7c-history{border-color:var(--found-line);color:var(--found);background:var(--found-tint)}
.w7c-crmrail .w7c-crmlink:hover{border-color:var(--found);background:var(--found-tint);color:var(--ink)}
.w7c-crmrail .w7c-crmlink:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media(max-width:820px){.w7c-crmrail{gap:6px;padding:8px}.w7c-crmlabel{width:100%}.w7c-crmrail .w7c-crmlink{font-size:12.5px}}

.w7c-utility{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 14px;align-items:center;margin:0 0 16px;padding:11px 14px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.w7c-utility-place{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 9px;min-width:0;font-size:13px;color:var(--ink2)}
.w7c-utility-place b{color:var(--ink);font-size:13px}.w7c-utility-label{color:var(--mute);font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.w7c-utility-links{display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;font-size:12.5px}
.w7c-utility-links a{color:var(--blue);font-weight:750;text-decoration:none}.w7c-utility-links a:hover{text-decoration:underline}
.w7c-utility-links span{color:var(--mute)}
.w7c-utility p{grid-column:1/-1;margin:0;color:var(--mute);font-size:12px;line-height:1.35}
@media(max-width:820px){
  .w7c-utility{display:block;margin:0 0 15px;padding:11px 13px}
  .w7c-utility-place{display:grid;gap:2px;line-height:1.35}
  .w7c-utility-label{margin-bottom:2px}
  .w7c-utility-links{margin-top:8px;gap:6px 14px}
  .w7c-utility p{margin-top:7px}
}

/* On a phone, lead with the call decision. The complete case evidence follows. */
.w7c-mobilelead{display:none}
.w7c-crmdrawer>summary,.w7c-whomore>summary{display:none}
@media (max-width:820px){
  .w7c-page .w7case:not(.w7compact) .w7ch{display:none}
  .w7c-mobilelead{display:block;margin:4px 0 14px}
  .w7c-mobilekicker{display:block;color:var(--mute);font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
  .w7c-mobilelead h1{margin:5px 0 6px;color:var(--ink);font:750 29px/1.1 var(--font-ui);letter-spacing:-.035em}
  .w7c-mobilemeta{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;color:var(--mute);font-size:13px;line-height:1.3}
  .w7c-mobile-status{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--ink2);font-size:12px;font-weight:700}
  .w7c-decision{margin-top:13px;padding:15px 17px 14px;border:1px solid var(--found-line);border-left:4px solid var(--found);border-radius:12px;background:var(--card)}
  .w7c-decision-label,.w7c-mobilefacts>div>span{display:block;color:var(--found);font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
  .w7c-decision p{margin:5px 0 6px;color:var(--ink);font-size:17px;line-height:1.3}
  .w7c-decision p b{font-weight:800}.w7c-decision p span{color:var(--ink2);font-size:14px}
  .w7c-decision-phone{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--found);font:750 30px/1.1 var(--font-num);text-decoration:none;white-space:nowrap}
  .w7c-decision-phone span{font:700 18px/1 var(--font-ui)}
  .w7c-decision-nophone{color:var(--mute);font-size:15px;font-weight:650}
  .w7c-mobilefacts{display:grid;gap:8px;margin-top:10px}
  .w7c-mobilefacts>div{padding:10px 13px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
  .w7c-mobilefacts>div p{margin:4px 0 0;color:var(--ink);font-size:14px;line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
  .w7c-mobilefacts .w7c-mobilecaution{border-color:var(--guard-line);background:var(--guard-tint)}
  .w7c-mobilefacts .w7c-mobilecaution>span{color:var(--guard)}
  .w7c-mobilecontext{margin-top:8px;color:var(--ink2);font-size:13px}
  .w7c-mobilecontext>summary{min-height:35px;padding:8px 1px;cursor:pointer;color:var(--blue);font-weight:700}
  .w7c-mobilecontext p{margin:7px 0;line-height:1.45}
  .w7c-crmdrawer{margin:0 0 14px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
  .w7c-crmdrawer>summary{display:flex;align-items:center;gap:8px;min-height:48px;padding:9px 12px;cursor:pointer;list-style:none;color:var(--ink);font-size:14px;font-weight:750}
  .w7c-crmdrawer>summary::-webkit-details-marker,.w7c-whomore>summary::-webkit-details-marker{display:none}
  .w7c-crmdrawer>summary small{margin-left:auto;color:var(--mute);font-size:12px;font-weight:550;text-align:right}
  .w7c-crmdrawer>summary .w7i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2}
  .w7c-crmdrawer[open]>summary .w7i{transform:rotate(90deg)}
  .w7c-crmdrawer .w7c-crmrail{margin:0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
  .w7c-crmdrawer .w7c-crmlabel{display:none}
  .w7c-whomore{margin-top:6px;border-top:1px solid var(--line)}
  .w7c-whomore>summary{display:block;min-height:44px;padding:12px 0 5px;cursor:pointer;color:var(--blue);font-size:13px;font-weight:750}
  .w7c-whomore>summary:after{content:'⌄';float:right;color:var(--mute)}
  .w7c-whomore[open]>summary:after{transform:rotate(180deg)}
}

/* The done state after a manager answers a candidate. */
.w7c-done{font-size:13px;color:var(--ink2);margin-top:8px}

/* ------------------------------------------- one tap deeper: the record */
.w7c-more{margin-top:18px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.w7c-more>summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px;cursor:pointer;list-style:none;
  font-size:14.5px;font-weight:650;color:var(--ink);border-radius:12px}
.w7c-more>summary::-webkit-details-marker{display:none}
.w7c-more>summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.w7c-more>summary .w7c-mc{font-size:13px;font-weight:500;color:var(--mute)}
.w7c-more>summary .w7i{width:16px;height:16px;margin-left:auto;fill:none;stroke:var(--mute);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform var(--dur-1) var(--ease)}
.w7c-more[open]>summary .w7i{transform:rotate(90deg)}
.w7c-more[open]>summary{border-bottom:1px solid var(--line2);border-radius:12px 12px 0 0}
.w7c-mb{padding:12px 14px 14px;min-width:0}
.w7c-acct{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 10px;font-size:13.5px;color:var(--ink2)}
.w7c-acl{font-size:12px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.w7c-more>.w7c-mb>.w7c-acct>.w7c-acl{flex-basis:100%;overflow-wrap:anywhere}
.w7c-acctscope{flex-basis:100%;font-size:12px;line-height:1.45;color:var(--mute)}
.w7c-more .w7c-own{max-width:none}
.w7c-more .w7c-own .ol{max-width:none}
.w7c-more .w7c-own select{min-width:156px;max-width:230px}
.w7c-stage{display:inline-flex;align-items:center;gap:6px}
.w7c-stage i{width:8px;height:8px;border-radius:50%;display:inline-block}
.w7c-parked{width:100%}
.w7c-rec{margin:0;padding:0}

/* ------------------------------------------------- the phone's sticky bar */
.w7c-bar{display:none}
@media (max-width:820px){
  .w7c-page{padding:0 4px}
  .w7c-bar{display:flex;background:var(--card);border-top:1px solid var(--line);padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
  .w7c-bar a,.w7c-bar button{height:52px;border-radius:10px;font-family:var(--font-ui);font-size:17px;font-weight:700;letter-spacing:0}
  .w7c-bar .c1{background:var(--dial);color:#fff}
  .w7c-bar .c2{background:var(--blue);color:#fff}
  .w7c-bar .w7i{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .w7c-bar a:focus-visible,.w7c-bar button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
}
html[data-theme="dark"] .w7c-bar .c1,html[data-theme="dark"] .w7c-bar .c2{color:#04121C}
html[data-theme="road"] .w7c-bar a,html[data-theme="road"] .w7c-bar button{font-size:18px}
@media (prefers-reduced-motion:reduce){.w7c-more>summary .w7i{transition:none}}

/* Packed desk columns (company.js layoutDesk): rows are 4px, each section spans
   its own height plus a 16px gap, so the two columns never share row heights. */
@container w7case (min-width:1060px){
  .w7c-page .w7case:not(.w7compact) .w7cbody.w7c-mas{grid-template-areas:none;grid-auto-rows:4px;row-gap:0;align-items:start}
  .w7c-page .w7case:not(.w7compact) .w7cbody.w7c-mas>*{grid-area:auto;margin-top:0;align-self:start}
}

/* Road mode on the case (DISPLAY §7 rule 7): the number at 36px, the reading
   text one step up, on the high-contrast palette the tokens already carry. */
html[data-theme="road"] .w7c-page .w7call-case .w7tn{font-size:36px}
@media (max-width:820px){
  html[data-theme="road"] .w7c-page .w7sum{font-size:17.5px}
  html[data-theme="road"] .w7c-page .w7evl .w7t,html[data-theme="road"] .w7c-page .w7say p,html[data-theme="road"] .w7c-page .w7runline{font-size:16px}
}
html[data-theme="road"] .w7c-back{color:var(--ink)}

/* The record's own controls, one tap deeper, keep the phone's 12px floor
   (DISPLAY §6.1): the owner avatar and word, the tab counts, the note chips. */
.w7c-mb .own .ini{font-size:12px}
.w7c-mb .own .ol,.w7c-mb .w6tab .w6tc{font-size:12px}
.w7c-mb .w6chips .w6chip{font-size:12.5px}

/* The decoded VIN illustrations remain informational. Tinted row edges and
   year/class typography add scan cues without making artwork look clickable. */
.w7c-page .fleet-image-note{font-size:12px}
.w7c-page .w7c-classscope{margin:8px 0 0;font-size:12px;line-height:1.45;color:var(--mute)}
.w7c-page .w4load{display:block;width:100%;min-height:38px;margin:10px 0 4px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--accent);font:700 13px var(--font-ui);cursor:pointer}
.w7c-page .w4load:hover,.w7c-page .w4load:focus-visible{border-color:var(--accent);background:var(--bluetint)}
.w7c-page .fleet-visuals tbody tr{border-left:3px solid var(--found-line);background:linear-gradient(90deg,var(--found-tint),var(--card) 38%)}
.w7c-page .fleet-visuals tbody tr:hover{border-left-color:var(--found);background:var(--found-tint)}
.w7c-page .fleet-visuals .fleet-photo{border-color:var(--found-line);background:var(--surface)}
.w7c-page .fleet-visuals .fleet-unit-year{color:var(--found);font-family:var(--font-num);font-weight:750}
.w7c-page .fleet-visuals .fleet-unit-class{color:var(--ink2);font-weight:700}
.w7c-page .fleet-visuals .fleet-vin,.w7c-page .fleet-visuals .fleet-model-caption{font-size:12px}
@media(max-width:600px){
  .w7c-page .fleet-visuals tbody tr{padding:12px 8px 12px 10px}
  .w7c-page .fleet-visuals .fleet-identity strong,.w7c-page .fleet-visuals td[data-label]:before{font-size:12px}
  .w7c-page .fleet-visuals .fleet-vin,.w7c-page .fleet-visuals .fleet-model-caption{font-size:12px}
}

/* Phone rhythm: the richest family stays near DISPLAY §3.2's 3,359px. */
@media (max-width:820px){
  .w7c-page .w7csec{margin-top:16px}
  .w7c-page .w7evl{padding:8px 0}
  .w7c-page .w7ch-acts{padding-top:10px}
  .w7c-page .w7ch .w7legend-sample{margin-top:10px}
  /* Records on a phone: name, then who has it, both flush left. */
  .w7c-page .w7recs li{padding:6px 0}
  .w7c-page .w7recs li span:last-child{text-align:left}
}
