/* PAGE CSS: south-dakota-trust-advantage
   Enqueued by functions.php when the slug matches.
   Lifted verbatim from the approved static build. */


/* ==========================================================
   PAGE: /south-dakota-trust-advantage/
   Devices unique to this page: editorial masthead, statute
   rail, sticky contents column, dark comparison table,
   limits panel, accordion. Deliberately shares no section
   structure with the homepage.
   ========================================================== */

/* ---------- Editorial masthead ---------- */
.open{padding-block:calc(var(--barh) + clamp(56px,7vw,96px)) clamp(48px,6vw,80px);}
.open__grid{display:grid;grid-template-columns:115fr 85fr;gap:clamp(36px,5vw,88px);align-items:end;}
.open h1{font-size:clamp(42px,6.4vw,86px);line-height:1.02;max-width:13ch;}
.open__lede{font-size:clamp(19px,1.9vw,23px);line-height:1.55;color:rgba(23,55,70,.88);max-width:44ch;margin:0 0 26px;}
.meta{display:flex;flex-wrap:wrap;gap:22px;font-family:var(--display);font-size:10.5px;
  text-transform:uppercase;letter-spacing:.2em;color:var(--slate);
  border-top:1px solid var(--stone);padding-top:16px;}

/* ---------- Statute rail ---------- */
.rail{border-block:1px solid var(--stone);}
.rail__in{display:grid;grid-template-columns:repeat(4,1fr);gap:0;}
.rail__cell{padding:clamp(26px,3vw,40px) clamp(18px,2.2vw,32px);border-left:1px solid var(--stone);}
.rail__cell:first-child{border-left:0;padding-left:0;}
.rail__cell b{display:block;font-family:var(--display);font-weight:200;
  /* sized for WORDS, not short figures. this rail previously held $906B and
     1983, where 48px was right. benefit labels need 40px to stay inside the cell. */
  font-size:clamp(26px,2.9vw,40px);line-height:1.05;color:var(--gold);margin-bottom:12px;letter-spacing:-.01em;}
.rail__cell span{display:block;font-size:14.5px;line-height:1.5;color:var(--slate);}

/* ---------- Statute accordion: two columns of four ---------- */
/* heading and intro both hold a single line on desktop */
.acc__title{font-size:clamp(24px,3.35vw,44px);max-width:none;white-space:nowrap;}
.doc__intro{max-width:none;margin-bottom:clamp(30px,3.4vw,44px);}
.doc__intro p{font-size:clamp(14px,1.35vw,17.5px);line-height:1.7;
  color:rgba(23,55,70,.88);max-width:none;white-space:nowrap;}

.acc{
  display:grid;grid-template-columns:1fr 1fr;gap:0;align-items:stretch;
  background:#F8F5EF;border:1px solid var(--stone);
  box-shadow:0 1px 44px rgba(23,55,70,.055);
}
.acc__col{padding:0 clamp(22px,2.6vw,40px);}
.acc__col + .acc__col{border-left:1px solid var(--stone);}

.acc details{border-bottom:1px solid var(--stone);}
.acc__col > details:last-of-type{border-bottom:0;}
.acc details[open]{
  background:rgba(207,200,188,.15);
  margin-inline:calc(clamp(22px,2.6vw,40px) * -1);
  padding-inline:clamp(22px,2.6vw,40px);
}

.acc summary{
  list-style:none;cursor:pointer;
  display:grid;grid-template-columns:34px minmax(0,1fr) 20px;gap:clamp(12px,1.4vw,20px);
  align-items:center;padding:clamp(19px,2vw,25px) 0;
}
.acc summary::-webkit-details-marker{display:none;}
.acc__no{font-family:var(--display);font-size:10.5px;letter-spacing:.18em;color:var(--gold);
  text-transform:uppercase;}
.acc__t{font-family:var(--display);font-weight:200;font-size:clamp(18px,1.75vw,23px);
  line-height:1.24;letter-spacing:-.005em;color:var(--ink);transition:color .2s;
  padding-right:clamp(8px,1.2vw,18px);}
.acc summary:hover .acc__t{color:var(--slate);}
.acc__sign{position:relative;width:13px;height:13px;justify-self:center;}
.acc__sign::before,.acc__sign::after{content:"";position:absolute;background:var(--gold);
  transition:opacity .22s,transform .22s;}
.acc__sign::before{left:0;top:6px;width:13px;height:1px;}
.acc__sign::after{left:6px;top:0;width:1px;height:13px;}
.acc details[open] .acc__sign::after{opacity:0;transform:rotate(90deg);}

.acc__body{padding:0 0 clamp(24px,2.6vw,32px) calc(34px + clamp(12px,1.4vw,20px));}
.acc__body p{font-size:16px;line-height:1.68;color:rgba(23,55,70,.9);max-width:52ch;}
.acc__body p:last-of-type{margin-bottom:0;}
.cite{display:inline-block;margin-top:18px;
  font-family:var(--display);font-size:10px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--slate);border:1px solid var(--stone);padding:7px 12px;background:var(--cream);}
.aside{border-left:2px solid var(--gold);padding:2px 0 2px 18px;margin:22px 0 0;
  font-family:var(--display);font-style:italic;font-weight:200;
  font-size:clamp(17px,1.75vw,21px);line-height:1.4;color:var(--ink);max-width:32ch;}

/* ---------- Comparison ---------- */
.cmp h2{color:var(--cream);max-width:26ch;margin-bottom:18px;}
.cmp p{color:rgba(244,240,232,.78);}
/* the standfirst, the caption and the source note all sit to the chart's
   own margins rather than the running 64ch measure. */
.cmp__lede{max-width:none;}
/* overflow-x alone promotes overflow-y from visible to auto, which spawns a
   phantom vertical scrollbar. pin the y axis explicitly. */
.tbl-wrap{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;}
.tbl{width:100%;border-collapse:collapse;margin-top:clamp(32px,4vw,52px);font-size:15.5px;}
.tbl th,.tbl td{text-align:left;padding:18px 20px;border-bottom:1px solid rgba(244,240,232,.16);vertical-align:top;}
.tbl thead th{font-family:var(--display);font-size:11px;font-weight:400;text-transform:uppercase;
  letter-spacing:.18em;color:var(--gold);border-bottom-color:rgba(244,240,232,.3);white-space:nowrap;}
.tbl tbody th{font-family:var(--body);font-weight:600;color:var(--cream);width:24%;min-width:190px;}
.tbl thead th:first-child{min-width:190px;}
/* five state columns, evenly divided, so a short cell in a narrow column does
   not wrap over three lines while its neighbour sits on one. */
.tbl thead th:not(:first-child){width:15.2%;}
/* desktop shows nothing here: the caption text came out at review and only
   the phone hint remains, so the paragraph itself must not reserve space. */
.tbl__cap{display:none;text-align:left;font-size:13.5px;line-height:1.5;max-width:none;
  color:rgba(244,240,232,.6);margin:clamp(28px,3.4vw,44px) 0 0;}
.tbl__cap + .tbl-wrap .tbl{margin-top:14px;}
.tbl__swipe{display:none;}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
  clip-path:inset(50%);white-space:nowrap;}
.tbl td{color:rgba(244,240,232,.8);}
.tbl td:first-of-type{color:var(--cream);}
.tbl tbody tr:last-child th,.tbl tbody tr:last-child td{border-bottom:0;}
.tbl__note{font-size:14px;color:rgba(244,240,232,.6);margin-top:20px;max-width:none;}

/* ---------- Requirements: staggered image rows ---------- */
/* one line at full width. 49 characters of letterspaced serif needs ~3.4vw
   to clear the content column, and it must never wrap on desktop. */
.req__title{font-size:clamp(24px,3.4vw,44px);max-width:none;white-space:nowrap;}
.req{display:grid;gap:clamp(64px,8vw,132px);margin-top:clamp(48px,6vw,84px);}
.req__row{display:grid;grid-template-columns:92fr 108fr;gap:clamp(32px,5vw,86px);align-items:center;}
.req__row--flip{grid-template-columns:108fr 92fr;}
.req__row--flip .req__media{order:2;}

.req__media{position:relative;aspect-ratio:1/1;overflow:hidden;background:#1B3B49;}
.req__media img{width:100%;height:100%;object-fit:cover;filter:saturate(.90) contrast(1.02);}
.req__media::after{content:"";position:absolute;inset:0;
  background:linear-gradient(to bottom,rgba(16,41,53,0) 62%,rgba(16,41,53,.34) 100%);}
/* placeholder plates, styled to sit deliberately until photography lands */
.req__media--slot::before{content:"";position:absolute;inset:0;
  background-image:
    repeating-linear-gradient(to right,rgba(244,240,232,.075) 0 1px,transparent 1px 20%),
    repeating-linear-gradient(to bottom,rgba(244,240,232,.075) 0 1px,transparent 1px 16.6%);}
.req__media--slot span{position:absolute;left:0;right:0;bottom:0;padding:20px 22px;z-index:2;
  font-family:var(--display);font-size:10px;text-transform:uppercase;letter-spacing:.22em;
  color:rgba(244,240,232,.4);}

.req__no{font-family:var(--display);font-size:11px;letter-spacing:.22em;color:var(--gold);
  text-transform:uppercase;display:block;margin-bottom:20px;}
/* one line each. the longest is "A qualified South Dakota trustee" at 32
   characters, sitting in a half-width column, so it needs ~2.15vw to clear. */
.req__body h3{font-size:clamp(21px,2.15vw,30px);line-height:1.18;margin-bottom:18px;
  max-width:none;white-space:nowrap;}
.req__body p{font-size:17px;line-height:1.72;color:rgba(23,55,70,.88);max-width:52ch;}
.req__body p:last-child{margin-bottom:0;}

/* ---------- Limits ---------- */
/* ---------- Roles ---------- */
/* one line. 52 characters across the full content column. */
.roles__title{max-width:none;white-space:nowrap;font-size:clamp(23px,3.25vw,42px);}
/* the standfirst spans the two-column panel below it, not the 64ch measure. */
.roles__lede{margin:18px 0 0;max-width:none;}
.roles{display:grid;grid-template-columns:1fr 1fr;gap:0;border:1px solid var(--stone);}
.roles__col{padding:clamp(30px,3.6vw,52px);}
.roles__col + .roles__col{border-left:1px solid var(--stone);}
.roles__col h3{font-size:21px;margin-bottom:14px;}
.roles__col p{font-size:16.5px;color:rgba(23,55,70,.86);margin:0 0 14px;}
.roles__tag{font-family:var(--display);font-size:10.5px;text-transform:uppercase;
  letter-spacing:.22em;color:var(--gold);display:block;margin-bottom:16px;}

/* ---------- FAQ ---------- */
/* one line. 40 characters across the full content column. */
.faq__title{max-width:none;white-space:nowrap;font-size:clamp(23px,3.5vw,46px);}
.faq{border-top:1px solid var(--stone);margin-top:clamp(40px,5vw,64px);}
.faq details{border-bottom:1px solid var(--stone);}
.faq summary{list-style:none;cursor:pointer;padding:24px 44px 24px 0;position:relative;
  font-family:var(--display);font-weight:300;font-size:clamp(18px,2vw,23px);line-height:1.3;color:var(--ink);}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{content:"";position:absolute;right:8px;top:50%;width:13px;height:1px;
  background:var(--gold);transform:translateY(-50%);}
.faq summary::before{content:"";position:absolute;right:14px;top:50%;width:1px;height:13px;
  background:var(--gold);transform:translateY(-50%);transition:opacity .2s;}
.faq details[open] summary::before{opacity:0;}
.faq p{font-size:16.5px;line-height:1.7;color:rgba(23,55,70,.86);margin:0 0 22px;max-width:70ch;}

/* ---------- Closing ---------- */
.end{position:relative;overflow:hidden;background:var(--ink-deep);}
.end__media{position:absolute;inset:0;z-index:0;}
.end__media img{width:100%;height:100%;object-fit:cover;object-position:52% 58%;filter:saturate(.88);}
/* firm enough for cream type over a bright window, light enough to keep the scene */
.end__media::after{content:"";position:absolute;inset:0;
  background:
    linear-gradient(rgba(16,41,53,.80),rgba(16,41,53,.80)),
    linear-gradient(to right,rgba(16,41,53,.42) 0%,rgba(16,41,53,.10) 54%,rgba(16,41,53,.46) 100%);}
.end .wrap{position:relative;z-index:1;}

.end__grid{display:grid;grid-template-columns:82fr 118fr;gap:clamp(32px,4vw,72px);align-items:center;}
.end h2{color:var(--cream);max-width:16ch;}
.end p{color:rgba(244,240,232,.82);}
/* both buttons hold one line; they stack only once the columns do */
.end__row{display:flex;flex-wrap:nowrap;gap:14px;margin-top:8px;}
.end__row .btn{flex:0 0 auto;padding-inline:26px;}

@media (max-width:1080px){
  .open__grid,.end__grid{grid-template-columns:1fr;}
  .acc__title{white-space:normal;font-size:clamp(24px,4.4vw,38px);}
  .doc__intro p{white-space:normal;font-size:17px;max-width:60ch;}
  .acc{grid-template-columns:1fr;}
  .acc__col + .acc__col{border-left:0;border-top:1px solid var(--stone);}
  .rail__in{grid-template-columns:1fr 1fr;}
  .rail__cell:nth-child(3){border-left:0;padding-left:0;}
  .rail__cell:nth-child(n+3){border-top:1px solid var(--stone);}
  .req__title{white-space:normal;font-size:clamp(24px,4.4vw,38px);}
  .req__body h3{white-space:normal;font-size:clamp(22px,3.4vw,30px);max-width:20ch;}
  .req__row,.req__row--flip{grid-template-columns:1fr;gap:28px;}
  .req__row--flip .req__media{order:0;}
  .req__media{aspect-ratio:3/2;}
}
@media (max-width:780px){
  .lim h2{white-space:normal;font-size:clamp(23px,4.2vw,34px);max-width:22ch;}
  .roles__title{white-space:normal;font-size:clamp(23px,4.2vw,34px);max-width:24ch;}
  .faq__title{white-space:normal;font-size:clamp(23px,4.2vw,34px);max-width:24ch;}
  .rail__in,.roles{grid-template-columns:1fr;}
  .roles__col + .roles__col{border-left:0;border-top:1px solid var(--stone);}
  .rail__cell{border-left:0;padding-left:0;border-top:1px solid var(--stone);}
  .rail__cell:first-child{border-top:0;}
  .acc__col{padding-inline:20px;}
  .acc details[open]{margin-inline:-20px;padding-inline:20px;}
  .acc summary{grid-template-columns:30px minmax(0,1fr) 18px;gap:12px;}
  .acc__body{padding:0 0 24px 42px;}
  .tbl{font-size:14px;}
  .tbl th,.tbl td{padding:14px 12px;}
  /* six columns do not fit a phone. the wrapper scrolls, and the row label is
     pinned so you can always tell which line you are reading. */
  .tbl tbody th,.tbl thead th:first-child{position:sticky;left:0;z-index:1;
    background:var(--ink-deep);min-width:150px;width:auto;}
  .tbl td{min-width:132px;}
  .tbl thead th:not(:first-child){width:auto;}
  .tbl__cap{display:block;}
  .tbl__swipe{display:inline;}
  .end__row{flex-wrap:wrap;}
  .end__row .btn{width:100%;justify-content:center;}
}

