/* Years in good health by area (/tools/healthy-life-expectancy/): a standalone tool page in Life Adviser's look. */
:root{
  --ink:#000000; --plum:#24122e; --navy:#112652; --magenta:#de0471; --muted:#5f6368;
  --line:#e3e6eb; --soft:#f3f4f7; --sea:#f4f7fb; --pink-soft:#fdf2f8;
  --head:'Manrope','Inter',system-ui,sans-serif; --body:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;touch-action:manipulation}
body.hy-page{margin:0;background:#fff;color:var(--ink);font-family:var(--body);font-size:17px;line-height:1.6;overflow-x:hidden}
.hy-wrap{max-width:1080px;margin:0 auto;padding:0 24px}
a{color:var(--magenta);text-underline-offset:2px}
a:hover{color:#a80355}
:focus-visible{outline:3px solid var(--magenta);outline-offset:2px}
button,input,textarea{touch-action:manipulation}
[hidden]{display:none!important}
.hy-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Intro */
.hy-intro{padding:48px 0 4px}
h1{font-family:var(--head);font-weight:800;font-size:clamp(34px,5.4vw,54px);line-height:1.05;letter-spacing:-.03em;margin:0 0 12px;color:var(--ink);max-width:860px}
.hy-lead{font-size:clamp(18px,2.2vw,21px);line-height:1.5;margin:0;max-width:760px}
h2{font-family:var(--head);font-weight:800;font-size:clamp(25px,3.4vw,32px);line-height:1.15;letter-spacing:-.02em;margin:0 0 14px}
h3{font-family:var(--head);font-weight:800;font-size:20px;line-height:1.3;margin:0 0 10px}

/* Tool */
.hy-tool{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:28px;align-items:start;margin:28px 0 0}
.hy-ctl{min-width:0}
.hy-sex{border:0;margin:0 0 18px;padding:0;min-width:0}
.hy-sex legend{font-weight:700;font-size:16px;margin:0 0 8px;padding:0}
.hy-seg{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hy-seg label{position:relative;display:block;margin:0;cursor:pointer}
.hy-seg input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;font-size:16px}
.hy-seg span{display:flex;align-items:center;justify-content:center;min-height:60px;border:2px solid var(--navy);border-radius:16px;background:#fff;
  font-family:var(--head);font-weight:800;font-size:19px;color:var(--navy);transition:background .15s,color .15s}
.hy-seg input:checked+span{background:var(--navy);color:#fff}
.hy-seg input:focus-visible+span{outline:3px solid var(--magenta);outline-offset:3px}
@media (hover:hover){.hy-seg label:hover span{background:#eef1f7}.hy-seg input:checked+span{background:var(--navy)}}
.hy-seg.hy-nudge span{animation:hy-nudge .6s ease 2}
@keyframes hy-nudge{50%{border-color:var(--magenta);box-shadow:0 0 0 4px rgba(222,4,113,.18)}}
@media (prefers-reduced-motion:reduce){.hy-seg.hy-nudge span{animation:none;border-color:var(--magenta)}}
.hy-field{margin:0 0 18px}
.hy-field>label{display:block;font-weight:700;font-size:16px;margin:0 0 8px}
.hy-combo{position:relative}
.hy-combo input{width:100%;min-height:58px;padding:14px 16px;border:2px solid #cfd4dc;border-radius:16px;font:inherit;font-size:18px;color:var(--ink);background:#fff;
  -webkit-appearance:none;appearance:none}
.hy-combo input:focus{outline:none;border-color:var(--magenta);box-shadow:0 0 0 3px rgba(222,4,113,.15)}
.hy-list{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:20;margin:0;padding:6px;list-style:none;background:#fff;border:1px solid var(--line);
  border-radius:16px;box-shadow:0 14px 36px rgba(17,38,82,.16);max-height:340px;overflow:auto}
.hy-list li{display:flex;flex-direction:column;justify-content:center;min-height:52px;padding:8px 12px;border-radius:10px;cursor:pointer}
.hy-list li[aria-selected=true],.hy-list li:hover{background:#eef1f7}
.hy-o-l{font-weight:700;font-size:17px;line-height:1.25}
.hy-o-s{font-size:14px;color:var(--muted);line-height:1.3}
.hy-priv{margin:8px 0 0;font-size:14px;color:var(--muted)}
.hy-msg{margin:8px 0 0;font-size:15px;font-weight:600;color:#b0002a}

/* Result card */
.hy-card{background:var(--navy);color:#fff;border-radius:22px;padding:24px 24px 22px}
.hy-card a{color:#fbd0e4}
.hy-card-t{margin:0;font-family:var(--head);font-weight:800;font-size:20px;line-height:1.25}
.hy-card-r{margin:2px 0 0;font-size:15px;opacity:.78}
.hy-big{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:12px 0 0}
.hy-big b{font-family:var(--head);font-weight:800;font-size:clamp(52px,9vw,68px);line-height:1;letter-spacing:-.03em}
.hy-big span{font-size:17px;font-weight:600}
.hy-bar{display:flex;height:18px;border-radius:99px;overflow:hidden;background:rgba(255,255,255,.18);margin:16px 0 8px}
.hy-bar i{display:block;height:100%}
.hy-bar .hy-g{background:#fbe3ee}
.hy-bar .hy-p{background:var(--magenta)}
.hy-bar-k{display:flex;flex-wrap:wrap;gap:4px 16px;margin:0 0 12px;padding:0;list-style:none;font-size:14px;opacity:.9}
.hy-bar-k li{display:flex;align-items:center;gap:7px}
.hy-bar-k i{display:inline-block;width:12px;height:12px;border-radius:3px}
.hy-lines{margin:0 0 14px;padding:0;list-style:none}
.hy-lines li{padding:8px 0;border-top:1px solid rgba(255,255,255,.18);font-size:16.5px}
.hy-lines li b{font-weight:800}
.hy-vs{display:inline-block;margin:0 0 12px;padding:8px 14px;border-radius:12px;font-weight:700;font-size:15px;line-height:1.35}
.hy-vs-up{background:#fff;color:var(--navy)}
.hy-vs-down{background:var(--magenta);color:#fff}
.hy-vs-mid{background:rgba(255,255,255,.16);color:#fff}
.hy-note{margin:0 0 12px;font-size:15px;opacity:.92}
.hy-empty p{margin:0 0 6px;font-size:18px}
.hy-empty p b{font-family:var(--head);font-weight:800;font-size:26px}

.hy-copy{font-family:var(--head);font-weight:700;font-size:16px;color:#fff;background:transparent;border:2px solid rgba(255,255,255,.75);border-radius:99px;
  min-height:46px;padding:10px 20px;cursor:pointer}
.hy-copy:hover{background:rgba(255,255,255,.1)}

/* Map */
.hy-map{margin:0;min-width:0}
.hy-frame{position:relative;background:var(--sea);border-radius:22px;overflow:hidden;aspect-ratio:4010/5315;max-height:760px;margin:0 auto}
.hy-frame svg{display:block;width:100%;height:100%;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.hy-frame svg.hy-zoomed{touch-action:none;cursor:grab}
.hy-frame svg.hy-drag{cursor:grabbing}
.hy-frame path.hy-a{cursor:pointer}
.hy-mbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.hy-zoom{display:flex;gap:8px;flex:none}
.hy-zoom button{font-size:16px;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--navy);display:flex;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:0 2px 8px rgba(17,38,82,.12);padding:0}
.hy-zoom button:disabled{opacity:.45;cursor:default}
.hy-zoom .hy-all{width:auto;border-radius:99px;padding:0 14px;font:700 16px var(--head)}
.hy-tip{position:absolute;z-index:5;pointer-events:none;background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px 10px;font-size:14px;line-height:1.35;
  box-shadow:0 6px 18px rgba(17,38,82,.16);max-width:220px}
.hy-tip b{display:block}
.hy-map figcaption{margin:12px 0 0}
.hy-mhint{margin:0;font-size:15px;color:var(--muted);flex:1 1 180px}
.hy-key-t{margin:0 0 6px;font-weight:700;font-size:15px}
.hy-keys{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px}
.hy-keys li{display:flex;align-items:center;gap:7px;font-size:14px}
.hy-keys i{display:inline-block;width:20px;height:14px;border-radius:4px;border:1px solid rgba(17,38,82,.14)}

/* Sections */
.hy-section{margin:56px 0 0;max-width:880px}
.hy-section.hy-lists{max-width:none}
.hy-section p{margin:0 0 14px}
.hy-fact{font-family:var(--head);font-weight:800;font-size:20px;line-height:1.35}
.hy-pair{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.hy-pair.hy-one-sex{grid-template-columns:1fr}
.hy-tw{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff}
.hy-tbl{width:100%;border-collapse:collapse;font-size:15px}
.hy-tbl th,.hy-tbl td{padding:10px 12px;border-top:1px solid var(--line);text-align:right;vertical-align:top}
.hy-tbl thead th{border-top:0;background:var(--navy);color:#fff;font-family:var(--head);font-weight:700;font-size:13px;line-height:1.3;vertical-align:bottom}
.hy-tbl thead th:first-child,.hy-tbl tbody th{text-align:left}
.hy-tbl tbody th{font-weight:700}
.hy-tbl tbody tr:nth-child(even){background:#f9fafb}
.hy-tbl td b{display:block;font-size:16px}
.hy-tbl .hy-s{display:block;font-weight:400;font-size:12.5px;color:var(--muted);line-height:1.35}
.hy-tbl .hy-tag{display:inline-block;margin-top:4px;font-size:11.5px;font-weight:700;line-height:1.3;border-radius:8px;padding:2px 7px;text-align:center}
.hy-tag-up{background:#e8edf7;color:var(--navy)}
.hy-tag-down{background:#fce9f3;color:#a80355}
.hy-tag-mid{background:#f2f4f6;color:#595959}
.hy-tag-unc{background:#fff3d6;color:#6b4a00}
.hy-tbl tr[hidden]{display:none!important}
.hy-rsearch{background:var(--sea);border:1px solid var(--line);border-radius:16px;padding:16px 18px;margin:0 0 14px}
.hy-rsearch label{display:block;font-weight:700;margin:0 0 8px}
.hy-rsearch input{width:100%;min-height:52px;padding:12px 14px;border:1.5px solid #cfd4dc;border-radius:12px;font:inherit;font-size:17px;background:#fff;-webkit-appearance:none;appearance:none}
.hy-rsearch input:focus{outline:none;border-color:var(--magenta);box-shadow:0 0 0 3px rgba(222,4,113,.15)}
.hy-rnone{margin:10px 0 0;font-weight:600}
.hy-reg{border:1px solid var(--line);border-radius:16px;background:#fff;margin:0 0 10px}
.hy-reg>summary{cursor:pointer;list-style:none;display:flex;align-items:center;flex-wrap:wrap;gap:2px 14px;padding:14px 48px 14px 18px;position:relative;min-height:56px}
.hy-reg>summary::-webkit-details-marker{display:none}
.hy-reg>summary::after{content:"";position:absolute;right:22px;top:50%;width:9px;height:9px;margin-top:-7px;border-right:2px solid var(--navy);border-bottom:2px solid var(--navy);transform:rotate(45deg)}
.hy-reg[open]>summary::after{margin-top:-2px;transform:rotate(225deg)}
.hy-reg-n{font-family:var(--head);font-weight:800;font-size:17px}
.hy-reg-s{font-size:14.5px;color:var(--muted)}
.hy-reg-b{padding:0 16px 14px}
.hy-reg-b>p{font-size:15.5px;margin:0 0 12px}
.hy-inc{display:block;font-weight:400;font-size:12.5px;color:var(--muted)}

/* Method */
.hy-method{border-top:1px solid var(--line);padding-top:8px}
.hy-method>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0}
.hy-method>summary::-webkit-details-marker{display:none}
.hy-method>summary::after{content:"+";font-family:var(--head);font-weight:800;font-size:28px;line-height:1;color:var(--navy)}
.hy-method[open]>summary::after{content:"\2212"}
.hy-method>summary h2{margin:0}
.hy-method h3{margin:26px 0 10px}
.hy-method p,.hy-method li{font-size:15.5px}
.hy-list-m{margin:0;padding:0 0 0 22px}
.hy-list-m li{margin:0 0 10px;padding-left:4px}
.hy-list-m li::marker{color:var(--magenta)}
.hy-sum{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14.5px;background:var(--soft);border-radius:10px;padding:8px 12px;margin:0 0 8px;overflow-wrap:anywhere}
.hy-cred{margin:26px 0 0;padding:18px 20px;border-radius:14px;background:var(--soft);font-size:15px}
.hy-cred p{margin:0 0 6px}
.hy-cred p:last-child{margin:0}

/* Journalists */
.hy-press figure{margin:10px 0}
.hy-press img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:12px}
.hy-dl{font-weight:700}
.hy-press label{display:block;font-weight:600;margin:14px 0 6px}
.hy-press textarea{width:100%;font:16px/1.45 ui-monospace,Menlo,monospace;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;resize:vertical}
.hy-btn{font-family:var(--head);font-weight:700;font-size:16px;color:#fff;background:var(--navy);border:0;border-radius:99px;min-height:46px;padding:10px 22px;cursor:pointer}

@media (max-width:900px){
  .hy-tool{grid-template-columns:1fr;gap:22px}
  .hy-frame{max-height:none}
}
@media (max-width:640px){
  .hy-wrap{padding:0 16px}
  .hy-intro{padding:28px 0 0}
  .hy-card{padding:20px 18px}
  .hy-pair{grid-template-columns:1fr}
  .hy-section{margin-top:44px}
  .hy-tbl{font-size:14px}
  .hy-tbl th,.hy-tbl td{padding:9px 8px}
  .hy-reg-b{padding:0 10px 10px}
  /* the five column region tables become one card per area */
  .hy-tbl.hy-wide thead{display:none}
  .hy-tbl.hy-wide,.hy-tbl.hy-wide tbody{display:block;width:100%}
  .hy-tbl.hy-wide tr{display:grid;grid-template-columns:1fr 1fr;column-gap:14px;padding:12px 12px 14px;border-top:1px solid var(--line)}
  .hy-tbl.hy-wide tbody th{grid-column:1/-1;border:0;padding:0 0 6px}
  .hy-tbl.hy-wide td{display:block;border-top:1px solid var(--line);padding:8px 0 0;text-align:left}
  .hy-tbl.hy-wide td::before{content:attr(data-label);display:block;font-size:12.5px;font-weight:600;color:var(--muted);line-height:1.3;margin:0 0 3px}
}
