/* ==========================================================================
   Signed-in Home — compact personal dashboard (v0.62).
   Active only with html.home-auth. The signed-out landing page is untouched.
   ========================================================================== */
.ht{display:none}
html.home-auth .ht{
  --ht-ex:#ef413b;--ht-ex-dark:#d93631;--ht-ex-soft:#fff0ee;
  --ht-teal:#078d82;--ht-teal-dark:#05766e;--ht-teal-soft:#e9f7f4;
  --ht-green:#2d8e4e;--ht-green-soft:#edf8ef;
  --ht-violet:#6754d9;--ht-violet-soft:#f1efff;
  --ht-blue:#235ad6;--ht-blue-soft:#edf3ff;
  --ht-card-border:rgba(23,50,71,.07);
  --ht-shadow:0 8px 24px rgba(23,50,71,.07),0 1px 2px rgba(23,50,71,.04);
  display:flex;flex-direction:column;gap:14px;padding:18px 0 26px
}

/* The public composition gives way to the authenticated dashboard. */
html.home-auth body[data-page="home"] .edition-line,
html.home-auth body[data-page="home"] .dash-top,
html.home-auth body[data-page="home"] .paths,
html.home-auth body[data-page="home"] .md-band,
html.home-auth body[data-page="home"] .prototype-note,
html.home-auth body[data-page="home"] .home-lower,
html.home-auth body[data-page="home"] .community-block,
html.home-auth body[data-page="home"] .advertisement{display:none}
html.home-auth body[data-page="home"]{background:radial-gradient(520px 300px at 100% 0,rgba(191,227,219,.25),transparent 72%),var(--paper)}

/* Greeting: intentionally short. */
.ht-greet{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:62px;min-width:0}
.ht-greet-txt{min-width:0}
.ht-hello{margin:0;font:800 clamp(1.65rem,2.4vw,2.15rem)/1.08 var(--serif);color:var(--ink);letter-spacing:-.035em;overflow-wrap:anywhere}
.ht-date{margin:3px 0 0;font-size:.9rem;color:var(--muted)}
.ht-chip{flex:none;display:flex;align-items:center;gap:9px;min-height:44px;padding:0 14px;border:1px solid rgba(7,141,130,.08);border-radius:14px;background:rgba(233,247,244,.86);color:var(--ink);font-size:.82rem;text-decoration:none;transition:background .18s,border-color .18s}
.ht-chip:hover{background:#dff3ef;border-color:rgba(7,141,130,.18);text-decoration:none}
.ht-chip-ico{display:inline-flex;color:var(--ht-teal)}
.ht-chip>svg:last-child{color:var(--ink)}

/* Quick actions. */
.ht-quick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ht-qa{display:flex;align-items:center;gap:12px;min-height:70px;padding:10px 14px;border-radius:14px;color:#fff;text-decoration:none;box-shadow:var(--ht-shadow);transition:transform .18s,box-shadow .18s,filter .18s}
.ht-qa:hover{color:#fff;text-decoration:none;transform:translateY(-2px);box-shadow:0 13px 28px rgba(23,50,71,.13);filter:saturate(1.04)}
.ht-qa:active{transform:translateY(0)}
.ht-qa-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:#fff}
.ht-qa-ex{background:linear-gradient(135deg,#f24943,var(--ht-ex-dark))}
.ht-qa-al{background:linear-gradient(135deg,#12a394,var(--ht-teal-dark))}
.ht-qa-ex .ht-qa-ico{color:var(--ht-ex)}
.ht-qa-al .ht-qa-ico{color:var(--ht-teal)}
.ht-qa-txt{display:flex;flex:1;min-width:0;flex-direction:column}
.ht-qa-txt strong{font:800 1.13rem/1.15 var(--serif)}
.ht-qa-txt span{font-size:.78rem;line-height:1.3;opacity:.94}
.ht-qa-go{display:inline-flex;transition:transform .18s}
.ht-qa:hover .ht-qa-go{transform:translateX(3px)}

/* Shared cards. */
.ht-card{padding:16px;border:1px solid var(--ht-card-border);border-radius:16px;background:var(--card-bg);box-shadow:var(--ht-shadow)}
.ht-card-h{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.ht-h{margin:0;font:800 1.25rem/1.16 var(--serif);color:var(--ink);letter-spacing:-.025em}
.ht-h-sm{font-size:1.02rem}
.ht-sub{margin:2px 0 0;font-size:.78rem;line-height:1.35;color:var(--muted)}
.ht-link{flex:none;display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:0 11px 0 13px;border:1px solid var(--line-strong);border-radius:12px;background:var(--card-bg);font-size:.76rem;font-weight:700;color:var(--ink);text-decoration:none;white-space:nowrap}
.ht-link:hover{background:var(--hover);text-decoration:none}
.ht-link svg{transition:transform .18s}.ht-link:hover svg{transform:translateX(3px)}
.ht-link:focus-visible,.ht-week-sum:focus-visible,.ht-sc:focus-visible,.ht-chip:focus-visible,.ht-mini:focus-visible,.ht-next-short:focus-visible,.ht-qa:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

/* Hoje. */
.ht-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ht-pan{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:108px;padding:14px;border-radius:13px}
.ht-pan-ex{background:linear-gradient(135deg,#fff4f2,var(--ht-ex-soft))}
.ht-pan-al{background:linear-gradient(135deg,#effaf7,var(--ht-teal-soft))}
.ht-pan-top{display:flex;align-items:flex-start;gap:10px;min-width:0}
.ht-pan-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%}
.ht-pan-ico svg{width:21px;height:21px}
.ht-pan-ex .ht-pan-ico{background:rgba(239,65,59,.12);color:var(--ht-ex)}
.ht-pan-al .ht-pan-ico{background:rgba(7,141,130,.12);color:var(--ht-teal)}
.ht-pan-txt{min-width:0}
.ht-k{margin:0 0 4px;font:800 .64rem/1.2 var(--sans);letter-spacing:.07em;text-transform:uppercase}
.ht-pan-ex .ht-k{color:var(--ht-ex-dark)}
.ht-pan-al .ht-k{color:var(--ht-teal-dark)}
.ht-name{margin:0;font:750 .96rem/1.24 var(--sans);color:var(--ink);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ht-meta{margin:3px 0 0;font-size:.75rem;line-height:1.35;color:var(--muted)}
.ht-mini{align-self:flex-start;font-size:.72rem;font-weight:750;color:var(--ht-teal-dark);text-underline-offset:2px}
.ht-nut{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.ht-nrow{display:flex;align-items:center;gap:8px;min-width:0}
.ht-nico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:rgba(7,141,130,.1);color:var(--ht-teal)}
.ht-nico svg{width:15px;height:15px}
.ht-nbody{flex:1;min-width:0}.ht-nv{margin:0;font-size:.69rem;color:var(--muted)}.ht-nv strong{font-size:.88rem;color:var(--ink)}
.ht-nbar{display:flex;align-items:center;gap:6px;margin-top:3px}
.ht-track{flex:1;height:5px;border-radius:99px;background:rgba(7,141,130,.13);overflow:hidden}
.ht-track>span{display:block;height:100%;border-radius:inherit;background:#42c39f}.is-prot .ht-track>span{background:var(--ht-green)}
.ht-pct{min-width:26px;text-align:right;font-size:.63rem;color:var(--muted)}
.ht-skel{display:block;height:10px;border-radius:6px;background:rgba(23,50,71,.07)}
.ht-skel.is-short{width:60%}

/* Right rail: week + one real contextual action. */
.ht-side{display:flex;flex-direction:column;gap:14px;min-width:0}
.ht-week{padding:15px 16px}
.ht-week-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.ht-week-sum{display:inline-flex;align-items:center;gap:3px;min-height:30px;padding:0;border:0;background:none;font:inherit;font-size:.72rem;color:var(--muted);text-decoration:none;cursor:pointer;white-space:nowrap}
.ht-week-sum:hover{color:var(--ink);text-decoration:none}.ht-week-sum svg{transition:transform .18s}.ht-week-sum:hover svg{transform:translateX(3px)}
.ht-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin:0;padding:0;list-style:none}
.ht-day{display:flex;flex-direction:column;align-items:center;gap:5px}
.ht-dot{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;border:1.5px solid var(--line-strong);background:var(--card-bg);color:#fff}
.ht-day.is-done .ht-dot{border-color:var(--ht-teal);background:var(--ht-teal)}
.ht-day.is-today .ht-dot{box-shadow:0 0 0 3px var(--card-bg),0 0 0 5px rgba(7,141,130,.24)}
.ht-dn{font-size:.65rem;color:var(--muted)}.ht-day.is-today .ht-dn{font-weight:800;color:var(--ink)}
.ht-next{display:flex;flex-direction:column;gap:13px}
.ht-next-h{display:flex;align-items:center;gap:11px}
.ht-next-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:#dff4ef;color:var(--ht-teal)}
.ht-summary{margin:0;padding:10px 12px;border-radius:11px;background:var(--ht-teal-soft);color:var(--ink);font-size:.76rem;line-height:1.35}
.ht-next-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ht-next-short{display:flex;align-items:center;gap:7px;min-height:50px;padding:8px;border-radius:11px;color:var(--ink);text-decoration:none;font-size:.72rem}
.ht-next-short:hover{text-decoration:none;filter:brightness(.98)}.ht-next-short>span{display:inline-flex}.ht-next-short.is-ex{background:var(--ht-ex-soft);color:var(--ht-ex-dark)}.ht-next-short.is-al{background:var(--ht-green-soft);color:var(--ht-green)}.ht-next-short.is-day{background:var(--ht-blue-soft);color:var(--ht-blue)}.ht-next-short.is-history{background:var(--ht-violet-soft);color:var(--ht-violet)}

/* Four equal section destinations. */
.ht-shortcuts ul{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0;padding:0;list-style:none}
.ht-sc{display:flex;align-items:center;gap:11px;min-height:76px;padding:11px 12px;border:1px solid transparent;border-radius:14px;color:var(--ink);text-decoration:none;box-shadow:var(--ht-shadow);transition:transform .18s,box-shadow .18s,border-color .18s}
.ht-sc:hover{transform:translateY(-2px);text-decoration:none;box-shadow:0 13px 28px rgba(23,50,71,.11)}
.ht-sc-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.72)}
.ht-sc-ico svg{width:22px;height:22px}.ht-sc-txt{display:flex;flex:1;min-width:0;flex-direction:column}.ht-sc-txt strong{font:800 .94rem/1.2 var(--serif)}.ht-sc-txt span{font-size:.69rem;line-height:1.3;color:var(--muted)}
.ht-sc-go{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#fff;color:var(--ink);box-shadow:0 1px 4px rgba(23,50,71,.1);transition:transform .18s}
.ht-sc:hover .ht-sc-go{transform:translateX(3px)}
.ht-sc-sa{background:linear-gradient(135deg,#159f91,var(--ht-teal-dark));color:#fff}.ht-sc-sa .ht-sc-ico{background:rgba(255,255,255,.16)}.ht-sc-sa .ht-sc-txt span{color:rgba(255,255,255,.9)}
.ht-sc-ex{background:var(--ht-ex-soft)}.ht-sc-ex:hover{border-color:rgba(239,65,59,.2)}.ht-sc-ex .ht-sc-ico{color:var(--ht-ex)}
.ht-sc-al{background:var(--ht-green-soft)}.ht-sc-al:hover{border-color:rgba(45,142,78,.2)}.ht-sc-al .ht-sc-ico{color:var(--ht-green)}
.ht-sc-su{background:var(--ht-violet-soft)}.ht-sc-su:hover{border-color:rgba(103,84,217,.2)}.ht-sc-su .ht-sc-ico{color:var(--ht-violet)}

/* Authenticated "Mito ou fato?": one strong, full-width content surface. */
html.home-auth body[data-page="home"] #saude{margin:0 0 20px;padding:14px;border:1px solid var(--ht-card-border);border-radius:16px;background:var(--card-bg);box-shadow:var(--ht-shadow)}
html.home-auth body[data-page="home"] #saude .section-heading{align-items:flex-end;margin-bottom:8px}
html.home-auth body[data-page="home"] #saude .section-heading .eyebrow{color:var(--muted)}
html.home-auth body[data-page="home"] #saude .section-heading .text-link{color:var(--ht-teal-dark)}
html.home-auth body[data-page="home"] #saude .investigation-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;border:0}
html.home-auth body[data-page="home"] #saude .investigation-card{min-height:165px;padding:14px 16px;border:1px solid var(--line);border-left:1px solid var(--line);border-radius:12px;box-shadow:none;background:var(--card-bg);transition:transform .18s,box-shadow .18s,border-color .18s}
html.home-auth body[data-page="home"] #saude .investigation-card:hover{transform:translateY(-2px);border-color:rgba(7,141,130,.2);box-shadow:0 9px 20px rgba(23,50,71,.08)}
html.home-auth body[data-page="home"] #saude .index-number,
html.home-auth body[data-page="home"] #saude .card-warning,
html.home-auth body[data-page="home"] #saude .evidence-scale{display:none}
html.home-auth body[data-page="home"] #saude .investigation-card h3{font-size:1.3rem;line-height:1.15;margin:2px 0}
html.home-auth body[data-page="home"] #saude .card-meta{font-size:.61rem}
html.home-auth body[data-page="home"] #saude .card-bottom{display:flex;align-items:flex-end;gap:8px;margin-top:auto;padding-top:7px;border:0}
html.home-auth body[data-page="home"] #saude .evidence-bar{display:block;flex:1;min-width:0}
html.home-auth body[data-page="home"] #saude .evidence-label{display:flex;font-size:.63rem}
html.home-auth body[data-page="home"] #saude .evidence-track{display:block;height:6px}
html.home-auth body[data-page="home"] #saude .evidence-num{display:block;font-size:.62rem}
html.home-auth body[data-page="home"] #saude .card-arrow{display:inline-flex;align-items:center;gap:3px;flex:none;width:auto;height:auto;border:0;font-size:0;color:var(--ht-teal-dark)}
html.home-auth body[data-page="home"] #saude .card-arrow::before{content:'Ver análise';font-size:.65rem;font-weight:750}
html.home-auth body[data-page="home"] #saude .card-arrow::after{content:'›';font-size:1rem;transition:transform .18s}
html.home-auth body[data-page="home"] #saude .investigation-card:hover .card-arrow::after{transform:translateX(3px)}
@media(min-width:761px){html.home-auth body[data-page="home"] #saude .investigation-card>p{display:-webkit-box;margin:4px 0 0;font-size:.85rem;line-height:1.45;color:var(--muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}}
@media(min-width:1080px){html.home-auth body[data-page="home"] #home-investigations>:nth-child(n+4){display:none}}

/* Desktop 8/4 command-centre grid. */
@media(min-width:1080px){
  html.home-auth .ht{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);grid-template-areas:"greet greet" "quick side" "today side" "short short";gap:16px 18px;align-items:start;padding-top:16px}
  .ht-greet{grid-area:greet}.ht-quick{grid-area:quick}.ht-today{grid-area:today}.ht-side{grid-area:side}.ht-shortcuts{grid-area:short}
}

/* Tablet: compact modules in two columns, main flow remains readable. */
@media(min-width:761px) and (max-width:1079px){
  html.home-auth .ht{gap:16px}.ht-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.ht-shortcuts ul{grid-template-columns:repeat(2,minmax(0,1fr))}
  html.home-auth body[data-page="home"] #saude .investigation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Mobile priority: greeting → actions → Hoje → week → next → categories → claims. */
@media(max-width:760px){
  html.home-auth .ht{gap:12px;padding:10px 0 18px}.ht-greet{min-height:52px}.ht-hello{font-size:1.5rem}.ht-date{font-size:.78rem}.ht-chip{min-height:38px;padding:0 10px;font-size:.7rem}.ht-chip-ico svg{width:18px;height:18px}
  .ht-quick{gap:8px}.ht-qa{min-height:60px;gap:8px;padding:8px 9px;border-radius:12px}.ht-qa-ico{width:32px;height:32px}.ht-qa-txt strong{font-size:.96rem}.ht-qa-txt span{font-size:.64rem}.ht-qa-go{display:none}
  .ht-card{padding:12px;border-radius:14px}.ht-card-h{margin-bottom:9px}.ht-h{font-size:1.08rem}.ht-sub{font-size:.7rem}.ht-link{min-height:32px;font-size:.7rem}
  .ht-panels{gap:8px}.ht-pan{min-height:112px;padding:10px;gap:6px}.ht-pan-ico{width:30px;height:30px}.ht-pan-ico svg{width:17px;height:17px}.ht-name{font-size:.83rem}.ht-meta{font-size:.66rem}.ht-nico{display:none}.ht-nut{gap:7px}.ht-nv strong{font-size:.8rem}
  .ht-side{gap:12px}.ht-week{padding:12px}.ht-week-h{margin-bottom:9px}.ht-week-sum{font-size:.66rem}.ht-dot{width:26px;height:26px}.ht-dn{font-size:.6rem}
  .ht-next-h{gap:9px}.ht-next-ico{width:36px;height:36px}.ht-summary{padding:9px 10px;font-size:.7rem}
  .ht-shortcuts ul{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ht-sc{min-height:64px;padding:9px;gap:8px}.ht-sc-ico{width:35px;height:35px}.ht-sc-ico svg{width:18px;height:18px}.ht-sc-txt strong{font-size:.82rem}.ht-sc-txt span{font-size:.61rem}.ht-sc-go{width:24px;height:24px}
  html.home-auth body[data-page="home"] #saude{margin-bottom:18px;padding:12px;border-radius:14px}
  html.home-auth body[data-page="home"] #saude .section-heading{align-items:flex-end;margin-bottom:8px}
  html.home-auth body[data-page="home"] #saude .investigation-grid{grid-template-columns:1fr;gap:8px}
  html.home-auth body[data-page="home"] #saude .investigation-card{min-height:0;padding:11px 40px 10px 12px}
  html.home-auth body[data-page="home"] #saude .evidence-track,html.home-auth body[data-page="home"] #saude .evidence-num{display:none}
  html.home-auth body[data-page="home"] #saude .card-bottom{margin-top:6px;padding-top:0}
  html.home-auth body[data-page="home"] #saude .card-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%)}
  html.home-auth body[data-page="home"] #saude .card-arrow::before{display:none}
}
@media(max-width:379px){.ht-chip{display:none}.ht-pan-top .ht-pan-ico{display:none}.ht-sc-txt span{display:none}}
@media(prefers-reduced-motion:reduce){.ht-qa,.ht-qa-go,.ht-link svg,.ht-week-sum svg,.ht-sc,.ht-sc-go,html.home-auth body[data-page="home"] #saude .investigation-card,html.home-auth body[data-page="home"] #saude .card-arrow::after{transition:none}.ht-qa:hover,.ht-sc:hover,html.home-auth body[data-page="home"] #saude .investigation-card:hover{transform:none}}
