/* Offer Comparison: only what is new beyond ../offer-summary/styles.css.
   Same Direction C rules: white sheet, graphite ink, one blue for what you can
   press, IBM Plex Sans, 18px body, nothing under 16px, 56px inputs. */

/* sticky header: two equal guaranteed totals, then the difference in words */
.cmphdr{grid-template-columns:minmax(0,1fr) minmax(0,1fr);row-gap:2px}
.cmphdr .tot small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmphdr .tot b{font-size:24px}
.totdiff{grid-column:1/-1;font-size:16px;line-height:1.35;font-weight:500;color:var(--ink)}

/* one item, both offers */
.pair{margin-top:24px;padding-top:16px;border-top:1px solid var(--hair)}
.group>.pair:first-child,.dgroup>.pair:first-of-type{border-top:0;padding-top:0}
.ptitle{font-size:20px;font-weight:600;line-height:1.3}
.pair>.hint{margin-top:4px}
.pair>.seg{margin-top:12px}
.side{margin-top:16px}
.sidename{font-size:18px;font-weight:500;line-height:1.35}
.side>.seg{margin-top:8px}
.side>.field{margin-top:8px}
.side>.hint{margin-top:8px}
.side .inrow.nolabel{margin-top:0}
.side>.seg+.field{margin-top:12px}
.side>.field+.seg{margin-top:4px}
.pair.names .field{margin-top:12px}
.pair.names .field:first-child{margin-top:12px}
.seg button{line-height:1.2}

/* the comparison sheet on screen */
.resultblock{margin-top:16px}
#phoneslot .resultblock,#deskslot .resultblock{margin-top:0}
.sheet{margin-top:8px}
.sides>*{min-width:0}
.cs-title{font-size:20px;font-weight:600;margin-top:12px}
.cs-cols,.cs-row,.cs-tot{display:grid;grid-template-columns:minmax(0,1fr) 90px 90px;column-gap:8px;align-items:baseline}
.cs-cols{position:sticky;top:0;z-index:3;background:var(--sheet);padding:10px 0 6px;border-bottom:1px solid var(--ink);font-size:16px;font-weight:500;color:var(--muted);line-height:1.25}
.cs-cols .l{visibility:hidden}
/* names break between words; a word longer than the column breaks at a soft hyphen (compare.js hyph) */
.cs-cols .fa,.cs-cols .fb{text-align:right;overflow-wrap:break-word;-webkit-hyphens:manual;hyphens:manual}
.cs-cols .d{display:none}
.cs-sec{font-size:18px;font-weight:600;margin-top:20px;display:flex;gap:10px}
.cs-sec .n{min-width:20px}
.cs-row{padding:8px 0;border-bottom:1px solid var(--hair)}
.cs-row .l{font-size:18px;line-height:1.35;display:grid;grid-template-columns:36px minmax(0,1fr);align-items:baseline}
.cs-row .none{font-weight:400;color:var(--muted)}
.cs-row .l .n,.cs-tot .l .n{display:inline-block;min-width:36px;font-size:16px;color:var(--muted)}
.cs-row .fa,.cs-row .fb{text-align:right;font-size:18px;font-weight:500;line-height:1.35}
.cs-row small,.cs-tot small{display:none}
.cs-row .d{grid-column:1/-1;font-size:16px;line-height:1.4;margin-top:2px;padding-left:36px}
.cs-tot{margin-top:16px;padding-top:10px;border-top:1px solid var(--ink)}
.cs-tot .l{font-size:18px;font-weight:600;line-height:1.3}
.cs-tot .fa,.cs-tot .fb{text-align:right}
.cs-tot b{font-size:19px;font-weight:600;border-bottom:4px double var(--ink);padding-bottom:2px;display:inline-block}
.cs-tot .d{grid-column:1/-1;font-size:18px;font-weight:600;margin-top:8px}
.cs-src{font-size:16px;color:var(--muted);margin-top:4px}
.cs-notes{margin-top:24px;padding-top:12px;border-top:1px solid var(--line)}
.cs-notes h4{font-size:16px;font-weight:600}
.cs-notes ol{margin:4px 0 0;padding-left:24px;font-size:16px;line-height:1.45;color:var(--muted)}
.cs-notes li{margin-top:4px}
#pdfactions,#doneactions{margin-top:24px}
.donemsg{font-size:20px;font-weight:600}
#doneactions .btn{margin-top:12px}
#pdferr{margin-top:16px}
.qhead{font-size:20px;font-weight:600;margin-top:32px}
.questions{margin-top:8px}
.result>.hint{margin-top:8px}

/* desktop workbench: the form in two columns, the comparison beside it */
@media (min-width:1100px){
  body.desk .wrap{grid-template-columns:600px minmax(560px,1fr)}
  body.desk .sides{display:grid;grid-template-columns:1fr 1fr;gap:24px}
  body.desk .side{margin-top:12px;min-width:0}
  body.desk .seg button{font-size:16px}
  body.desk .pair.names .sides .field{margin-top:12px}
  body.desk .dgroup>.pair:first-of-type{margin-top:16px}
  body.desk[data-on=step] .pcol{position:sticky;top:24px;max-height:calc(100vh - 48px);overflow:auto;background:var(--sheet);border:1px solid var(--hair);padding:0 32px 32px}
  body.desk .sheet{margin-top:0;padding-top:16px}
  body.desk .cs-cols,body.desk .cs-row,body.desk .cs-tot{grid-template-columns:minmax(0,1fr) 120px 120px minmax(0,1.15fr);column-gap:16px}
  body.desk .cs-cols .d{display:block}
  body.desk .cs-row .d,body.desk .cs-tot .d{grid-column:auto;margin-top:0;padding-left:0}
  body.desk .cs-tot .d{font-size:16px}
  body.desk .cs-row small{display:block;font-size:16px;font-weight:400;color:var(--muted);line-height:1.3;margin-top:2px}
  body.desk .cs-row .l{font-size:17px}
  body.desk .maker{margin-bottom:0}
}

/* narrower laptops, 1100 to 1279 wide: a slimmer form column, with the two offers stacked
   so every toggle keeps whole words, and the page never scrolls sideways */
@media (min-width:1100px) and (max-width:1279px){
  body.desk .wrap{grid-template-columns:460px minmax(0,1fr);gap:24px;padding:24px}
  body.desk main{padding:0 24px 40px}
  body.desk .tothdr{margin:24px -24px 0;padding:12px 24px}
  body.desk .sides{grid-template-columns:minmax(0,1fr);gap:0}
  body.desk .side{margin-top:16px}
  body.desk[data-on=step] .pcol{padding:0 20px 24px}
  body.desk .cs-cols,body.desk .cs-row,body.desk .cs-tot{grid-template-columns:minmax(0,1fr) 104px 104px minmax(0,1fr);column-gap:12px}
}
