/* PPLI Workspace — layout corrections applied after the first visual pass.
   Kept separate so the base sheet stays the design system and this stays the fix list. */

/* The content column ran the full width of the viewport, pushing body text past a
   readable measure. The theme forces `body:has(.pp) main {max-width:100%!important}`
   for its full-bleed pages, and the workspace column is a <main>, so it needs the
   same weapon back. */
.wsx .wsx-main{max-width:1340px!important;margin:0 auto;width:100%;overflow-x:hidden}

/* Five tool cards in an auto-fit grid collapsed to one row and clipped.
   Three across, then two, then one. min-width:0 stops a long line inside a card
   from forcing the track wider than its share. */
.wsx .wsx-toolgrid{grid-template-columns:repeat(3,minmax(0,1fr))}
.wsx .wsx-toolcard{min-width:0}
@media(max-width:1180px){.wsx .wsx-toolgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.wsx .wsx-toolgrid{grid-template-columns:minmax(0,1fr)}}

/* Same guard on the other auto grids. */
.wsx .wsx-grid > *,.wsx .wsx-tiles > *,.wsx .wsx-people > *{min-width:0}

/* Reading measure on long-form blocks. */
.wsx .wsx-post p{max-width:860px}
.wsx .wsx-obl-b .n{max-width:900px}
.wsx .wsx-verdict{max-width:960px}
.wsx .wsx-serif{max-width:900px}
.wsx .wsx-toolcard-d{max-width:none}

/* The tool hero now sits inside the centred column rather than bleeding to the
   viewport edge, so it needs its own edge treatment. */
.wsx .wsx-toolhero{border-left:1px solid rgba(176,149,72,.2);border-right:1px solid rgba(176,149,72,.2)}
@media(max-width:1080px){.wsx .wsx-toolhero{border-left:none;border-right:none}}

/* Members grid looks thin when only a couple of members exist. */
.wsx .wsx-people{grid-template-columns:repeat(auto-fit,minmax(340px,440px));justify-content:start}
@media(max-width:760px){.wsx .wsx-people{grid-template-columns:minmax(0,1fr)}}


/* ==========================================================================
   Carrier register and meeting brief.
   Three tax treatments carry a colour each, and the colour is used
   consistently everywhere the treatment is shown, because that field — not
   the domicile — is the one that decides whether Form 720 is owed.
     us domestic  green   no excise
     953(d)       gold    no excise while the election stands
     foreign      red     1% excise, quarterly Form 720
   ========================================================================== */

.wsx{--us:#2E6152;--el:#B09548;--fo:#9A3B2F}

/* --- Standing note at the head of a register ----------------------------- */
.wsx .wsx-callout{background:#fff;border:1px solid var(--ln);border-left:3px solid var(--gd);
  padding:18px 22px;font-size:12.5px;line-height:1.85;color:var(--mu);max-width:1000px;margin-bottom:26px}
.wsx .wsx-callout strong{color:var(--nv);font-weight:700}

/* --- Carrier card -------------------------------------------------------- */
.wsx .wsx-carrier{background:#fff;border:1px solid var(--ln);border-left:3px solid var(--ln);
  padding:22px 24px 18px;margin-bottom:14px;max-width:1080px}
.wsx .wsx-carrier.us_domestic{border-left-color:var(--us)}
.wsx .wsx-carrier.elected_953d{border-left-color:var(--el)}
.wsx .wsx-carrier.foreign{border-left-color:var(--fo)}

.wsx .wsx-carrier-h{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.wsx .wsx-carrier-h h3{font-size:19px;line-height:1.3;margin:0 0 4px;color:var(--nv)}
.wsx .wsx-carrier-h .g{font-size:11.5px;color:var(--mu);letter-spacing:.02em}
.wsx .wsx-carrier-h .wsx-tag{flex:0 0 auto;margin-top:2px}
.wsx .wsx-carrier.us_domestic .wsx-carrier-h .wsx-tag{color:var(--us);border-color:rgba(46,97,82,.4)}

/* The plain-language consequence, set on a tint of its own colour so the three
   treatments are separable at a glance without reading. */
.wsx .wsx-carrier-tax{margin-top:14px;padding:11px 14px;font-size:12px;line-height:1.75;
  color:var(--tx);background:var(--cr);border:1px solid var(--ln)}
.wsx .wsx-carrier.us_domestic .wsx-carrier-tax{background:rgba(46,97,82,.06);border-color:rgba(46,97,82,.22)}
.wsx .wsx-carrier.elected_953d .wsx-carrier-tax{background:rgba(176,149,72,.08);border-color:rgba(176,149,72,.3)}
.wsx .wsx-carrier.foreign .wsx-carrier-tax{background:rgba(154,59,47,.06);border-color:rgba(154,59,47,.25)}

.wsx .wsx-carrier > .wsx-note{margin-top:12px}

/* Facts strip: label above value, wraps down to one column on a phone. */
.wsx .wsx-carrier-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:16px 24px;margin-top:18px;padding-top:16px;border-top:1px dashed var(--ln)}
.wsx .wsx-carrier-g > div{min-width:0;font-size:12.5px;line-height:1.6;color:var(--tx)}
.wsx .wsx-carrier-g .wsx-k{display:block;margin-bottom:5px}
/* The rating line is emitted as "A- (Excellent), stable" followed by two <em>
   fragments that already carry their own leading punctuation ("— AM Best",
   ", affirmed Dec 2023"). Setting them as blocks stranded that punctuation at
   the start of a line, so they stay inline and read as one sentence. The site
   design system paints every <em> gold; a rating agency and a date are facts,
   not emphasis, so they are pulled back to the muted text colour. */
.wsx .wsx-carrier-g > div em{font-style:normal;color:var(--mu)!important}

/* The adviser's own note on the entity — their words, so it is set apart. */
.wsx .wsx-carrier-n{margin-top:16px;padding:10px 0 10px 14px;border-left:2px solid var(--gd);
  font-size:12.5px;line-height:1.8;color:var(--tx);max-width:820px}

.wsx .wsx-carrier-f{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;
  margin-top:18px;padding-top:14px;border-top:1px solid var(--ln)}
.wsx .wsx-carrier-f a{font-size:9px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;
  color:var(--gd);text-decoration:none;border-bottom:1px solid rgba(176,149,72,.35);padding-bottom:1px}
.wsx .wsx-carrier-f a:hover{color:var(--nv);border-bottom-color:var(--nv)}
.wsx .wsx-carrier-f .wsx-btn{margin-left:auto}
.wsx .wsx-carrier-f .wsx-btn + .wsx-tag{margin-left:0}

@media(max-width:640px){
  .wsx .wsx-carrier{padding:18px 16px 16px}
  .wsx .wsx-carrier-h{flex-direction:column;gap:10px}
  .wsx .wsx-carrier-f .wsx-btn{margin-left:0}
}

/* --- Carrier read-out inside the client form ----------------------------- */
/* Appears live under the carrier <select> so the tax consequence of the choice
   is visible while the choice is being made, not after it is saved. */
.wsx .wsx-carrierbox{margin-top:12px;padding:13px 16px;background:var(--cr);
  border:1px solid var(--ln);border-left:3px solid var(--ln)}
.wsx .wsx-carrierbox.us_domestic{border-left-color:var(--us);background:rgba(46,97,82,.05)}
.wsx .wsx-carrierbox.elected_953d{border-left-color:var(--el);background:rgba(176,149,72,.07)}
.wsx .wsx-carrierbox.foreign{border-left-color:var(--fo);background:rgba(154,59,47,.05)}
.wsx .wsx-carrierbox .wsx-k{display:block;margin-bottom:6px}
.wsx .wsx-carrierbox .n{font-size:14px;font-weight:600;color:var(--nv);line-height:1.4;margin-bottom:5px}
.wsx .wsx-carrierbox .t{font-size:11.5px;line-height:1.75;color:var(--mu)}

/* --- Prepare for a meeting ----------------------------------------------- */
.wsx .wsx-pickbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px;
  background:#fff;border:1px solid var(--ln);padding:18px 22px;margin-bottom:24px;max-width:1000px}
.wsx .wsx-pickbar .wsx-f{margin:0;flex:1 1 320px;min-width:0}
.wsx .wsx-pickbar select{width:100%}

/* The brief is a document, not a dashboard panel: white sheet, wide margins,
   and it must survive window.print() as the only thing on the page. */
.wsx .wsx-brief{background:#fff;border:1px solid var(--ln);border-top:3px solid var(--nv);
  padding:38px 44px 30px;max-width:1000px;box-shadow:0 1px 3px rgba(10,15,23,.05)}
.wsx .wsx-brief-head{position:relative;padding-bottom:22px;margin-bottom:6px;border-bottom:1px solid var(--ln)}
/* The only PPLI mark available is the white one, which is invisible on the white
   sheet, so it sits on a navy chip — which also reads as a masthead stamp when
   the brief is printed. */
.wsx .wsx-brief-mark{position:absolute;top:0;right:0;height:16px;width:auto;
  background:var(--nv);padding:9px 13px;box-sizing:content-box}
.wsx .wsx-brief-head h2{font-size:27px;line-height:1.22;color:var(--nv);margin:0 0 12px;
  padding-right:140px;max-width:760px}
.wsx .wsx-brief-st{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:14px}
.wsx .wsx-brief-head p{font-size:13.5px;line-height:1.8;color:var(--mu);max-width:760px;margin:0}

.wsx .wsx-brief-s{padding:22px 0;border-top:1px solid var(--ln)}
.wsx .wsx-brief-s:first-of-type{border-top:none}
.wsx .wsx-brief-s h3{font-size:10px;letter-spacing:.2em;text-transform:uppercase;font-weight:700;
  color:var(--gd);margin:0 0 14px}
/* The two sections an adviser can be embarrassed by in the room are marked by
   the heading colour alone. An indented rule was tried first and rejected: it
   pushed those sections' text out of line with every other section, which reads
   as a mistake on a printed page. */
.wsx .wsx-brief-s.gaps h3,.wsx .wsx-brief-s.risk h3{color:var(--rd)}
.wsx .wsx-brief-s.agenda{background:var(--cr);padding:22px 20px;border-left:2px solid var(--nv)}

.wsx .wsx-dl{display:grid;grid-template-columns:220px minmax(0,1fr);margin:0}
.wsx .wsx-dl dt{font-size:8.5px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;
  color:var(--mu);padding:9px 16px 9px 0;border-top:1px solid var(--cr2);align-self:start;line-height:1.7}
.wsx .wsx-dl dd{font-size:13.5px;line-height:1.7;color:var(--tx);margin:0;
  padding:9px 0;border-top:1px solid var(--cr2)}
.wsx .wsx-dl dt:first-of-type,.wsx .wsx-dl dd:first-of-type{border-top:none;padding-top:0}
@media(max-width:700px){
  .wsx .wsx-dl{grid-template-columns:minmax(0,1fr)}
  .wsx .wsx-dl dt{padding:12px 0 2px;border-top:1px solid var(--cr2)}
  .wsx .wsx-dl dd{padding:0 0 4px;border-top:none}
  .wsx .wsx-dl dd:first-of-type{padding-top:0}
}

.wsx .wsx-points{list-style:none;margin:0;padding:0}
.wsx .wsx-points li{position:relative;padding:0 0 11px 20px;font-size:13.5px;line-height:1.75;color:var(--tx);max-width:800px}
.wsx .wsx-points li:last-child{padding-bottom:0}
.wsx .wsx-points li:before{content:"";position:absolute;left:0;top:9px;width:6px;height:1px;background:var(--gd)}
.wsx .wsx-brief-s.agenda .wsx-points{counter-reset:ag}
.wsx .wsx-brief-s.agenda .wsx-points li{counter-increment:ag;padding-left:30px}
.wsx .wsx-brief-s.agenda .wsx-points li:before{content:counter(ag);width:auto;height:auto;top:0;
  font-size:9px;letter-spacing:.1em;font-weight:700;color:var(--gd);background:none}

.wsx .wsx-brief-note{font-size:11.5px;line-height:1.75;color:var(--mu);margin:12px 0 0;max-width:800px}
.wsx .wsx-brief-s .wsx-dl + .wsx-points,.wsx .wsx-brief-s .wsx-points + .wsx-brief-note{margin-top:14px}
.wsx .wsx-brief-foot{margin-top:8px;padding-top:16px;border-top:1px solid var(--ln);
  font-size:11px;line-height:1.75;color:var(--mu)}

.wsx .wsx-brief-act{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px;max-width:1000px}

@media(max-width:640px){
  .wsx .wsx-brief{padding:26px 20px 22px}
  .wsx .wsx-brief-head h2{font-size:22px;padding-right:0}
  .wsx .wsx-brief-mark{position:static;display:block;margin-bottom:14px}
}

/* --- Printing the brief --------------------------------------------------- */
/* The brief carries a "Print or save as PDF" button. Everything else on the
   page — site header, rail, picker, the buttons themselves — is hidden rather
   than restyled, so a theme change upstream cannot leak into the printed sheet. */
@media print{
  @page{margin:16mm}
  body{background:#fff!important}
  body *{visibility:hidden!important}
  .wsx .wsx-brief,.wsx .wsx-brief *{visibility:visible!important}
  .wsx .wsx-brief{position:absolute!important;left:0;top:0;width:100%;max-width:none;
    border:none;box-shadow:none;padding:0;margin:0}
  .wsx .wsx-brief-head{border-bottom:1.5px solid #000}
  .wsx .wsx-brief-head h2{font-size:22px;color:#000}
  .wsx .wsx-brief-s{page-break-inside:avoid;break-inside:avoid;border-top-color:#bbb}
  .wsx .wsx-brief-s.agenda{background:none;border-left:2px solid #000}
  .wsx .wsx-brief-mark{background:none;padding:0;filter:invert(1) grayscale(1)}
  .wsx .wsx-brief-s h3{color:#000}
  .wsx .wsx-dl dd,.wsx .wsx-points li{color:#000}
  .wsx .wsx-brief-act{display:none!important}
}
