/* HowToSurvive.in share buttons (plugin 1.0.315, owner-approved 5 Nov 2026). Loaded only on case studies and safety blogs while the switch is On.
   Everything is scoped to .hts-share / .hts-filed-line / .hts-sb so nothing existing is touched. Selectors are deliberately specific because the live theme has a bare svg{width:16px} rule and link/button colour rules.
   Colours (contrast on the real backgrounds is checked by tests/share/contrast-315.cjs): WhatsApp button white on #0a7a3d 5.43:1; other buttons #0d3855 on #fff 12.25:1; border #6f8798 3.75:1 (needs 3:1); label #3b4d5e; card #eef3f8. */

/* Header line: the existing "Filed under" div on the left, the Share row on the right (own row on phones). */
.hts-site .hts-hero .hts-filed-line{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:10px 0 0}
.hts-site .hts-hero .hts-filed-line>div.hts-filed-under{margin:0}
.hts-site .hts-hero .hts-filed-line>.hts-share{margin-left:auto}

.hts-share{font-family:Arial,Helvetica,sans-serif;box-sizing:border-box}
.hts-share *{box-sizing:border-box}
.hts-share-header{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:#12223a}
.hts-share .hts-share-label{font:700 12px/1 Arial,Helvetica,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#3b4d5e;margin-right:2px}

/* Buttons */
:is(.hts-share,.hts-panels h3) .hts-sb{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;min-width:34px;padding:0 12px;margin:0;border:1.5px solid #6f8798;border-radius:999px;background:#fff;color:#0d3855!important;font:700 13px/1 Arial,Helvetica,sans-serif;text-decoration:none!important;text-transform:none;letter-spacing:0;cursor:pointer;box-shadow:none;-webkit-appearance:none;appearance:none;vertical-align:middle}
:is(.hts-share,.hts-panels h3) .hts-sb:hover{background:#eef3f8;border-color:#0d3855}
:is(.hts-share,.hts-panels h3) .hts-sb[hidden]{display:none!important}
:is(.hts-share,.hts-panels h3) .hts-sb.hts-sb-ic{padding:0;width:34px}
:is(.hts-share,.hts-panels h3) .hts-sb svg{display:block;width:18px;height:18px;min-width:18px;flex:none;fill:currentColor;stroke:none}
:is(.hts-share,.hts-panels h3) .hts-sb svg.hts-sb-line{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
:is(.hts-share,.hts-panels h3) .hts-sb.hts-sb-wa{background:#0a7a3d;border-color:#0a7a3d;color:#fff!important}
:is(.hts-share,.hts-panels h3) .hts-sb.hts-sb-wa:hover{background:#086a35;border-color:#086a35}
:is(.hts-share,.hts-panels h3) .hts-sb:focus{outline:none}
:is(.hts-share,.hts-panels h3) .hts-sb:focus-visible{outline:3px solid #0d3855;outline-offset:2px;box-shadow:0 0 0 2px #fff}
:is(.hts-share,.hts-panels h3) .hts-sb.hts-sb-wa:focus-visible{outline-color:#0d3855}

.hts-share .hts-share-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hts-share .hts-share-live.is-on{position:static;width:auto;height:auto;clip:auto;overflow:visible;display:inline-block;margin-left:8px;background:#0b1f33;color:#fff;border-radius:6px;font:700 12px/1.2 Arial,Helvetica,sans-serif;padding:6px 10px}
.hts-share-card .hts-share-live.is-on{display:block;margin:10px 0 0;width:max-content;max-width:100%}

/* Card (option C) */
.hts-share.hts-share-card{background:#eef3f8;border:1px solid #cbd8df;border-radius:12px;padding:18px;margin:22px 0 8px;color:#12223a}
.hts-share-card .hts-share-kicker{display:block;font:700 11px/1.2 Arial,Helvetica,sans-serif;letter-spacing:.12em;color:#a62b0c;text-transform:uppercase}
.hts-share-card h3{font:400 24px/1.25 Georgia,'Times New Roman',serif;margin:4px 0 4px;color:#0b1f33;letter-spacing:0}
.hts-share-card p{margin:0 0 12px;font:400 15px/1.45 Arial,Helvetica,sans-serif;color:#12223a}
.hts-share-card .hts-share-card-row{display:flex;flex-wrap:wrap;gap:8px}
.hts-share-card .hts-sb{min-height:44px;min-width:44px;border-radius:12px;font-size:15px;padding:0 14px}
.hts-share-card small{display:block;margin-top:12px;color:#3b4d5e;font:400 12px/1.4 Arial,Helvetica,sans-serif}

/* Section copy-link icon inside key headings */
.hts-panels h3[id^="hts-sec-"]{scroll-margin-top:16px}
.hts-panels h3 .hts-sb.hts-sb-sec:not(.is-on){visibility:hidden}
.hts-panels h3 .hts-sb.hts-sb-sec{width:34px;min-height:34px;margin-left:10px;padding:0;vertical-align:middle;font-size:12px;line-height:1}

/* Phones and coarse pointers: 44 px targets */
@media (pointer:coarse),(max-width:760px){
  :is(.hts-share,.hts-panels h3) .hts-sb{min-height:44px;min-width:44px;border-radius:12px;font-size:15px}
  :is(.hts-share,.hts-panels h3) .hts-sb.hts-sb-ic{width:44px}
  .hts-panels h3 .hts-sb.hts-sb-sec{width:44px;min-height:44px}
}
@media (max-width:760px){
  .hts-site .hts-hero .hts-filed-line>.hts-share{margin-left:0;width:100%}
  .hts-share-header{padding:8px 0 0;gap:8px}
  .hts-share-header .hts-share-label{flex:0 0 100%;margin:0 0 -2px}
  /* with a native share sheet the row is WhatsApp, Copy link, More; without one every button stays (nothing is lost) */
  .hts-share-header.has-native .hts-sb-ic{display:none!important}
  .hts-share-header.has-native .hts-sb-wa{flex:1 1 auto}
  .hts-share.hts-share-card{padding:16px}
  .hts-share-card h3{font-size:22px}
  .hts-share-card .hts-sb-wa{flex:1 1 100%}
  .hts-panels h3[id^="hts-sec-"]{scroll-margin-top:122px}
}
@media (prefers-reduced-motion:reduce){:is(.hts-share,.hts-panels h3) .hts-sb,.hts-share .hts-share-live{transition:none!important;animation:none!important}}
@media print{.hts-share{display:none!important}.hts-site .hts-hero .hts-filed-line{display:block}}
