/* =========================================================
   Tempo web — responsive browser layout.
   Loaded after styles.css: reuses its tokens and components and
   only adds the shell (sidebar) and wider, multi-column layouts.
     < 720px    mobile layout (bottom sheets, FAB), no sidebar
     720–1099px icon rail + centered dialogs
     ≥ 1100px   full sidebar
   Content columns respond to the main pane width (container queries).
   ========================================================= */
body.web {
  display: block; height: 100dvh; overflow: hidden;
  background: var(--bg);
  --side-w: 0px;
}
.shell { display: flex; height: 100dvh; }
body.web #app {
  position: relative; inset: auto; flex: 1; min-width: 0; height: 100dvh;
  container: main / inline-size;
}
.web .wrap { max-width: 1180px; margin: 0 auto; }
.web .sheet:focus { outline: none; }

/* =========================================================
   Sidebar
   ========================================================= */
.side { display: none; }
@media (min-width: 720px) {
  body.web { --side-w: 84px; }
  .side {
    display: flex; flex-direction: column; flex: none; width: var(--side-w);
    padding: 18px 12px; overflow-y: auto; scrollbar-width: none;
    background: color-mix(in srgb, var(--surface) 45%, var(--bg));
    border-right: 1px solid var(--line);
  }
  .side::-webkit-scrollbar { display: none; }
}
@media (min-width: 1100px) {
  body.web { --side-w: 280px; }
  .side { padding: 22px 16px 18px; }
}

.side-brand {
  display: flex; align-items: center; gap: 11px; height: 48px; padding: 0 9px; margin-bottom: 14px;
  color: var(--text); text-decoration: none; font-size: 21px; font-weight: 800; letter-spacing: -.04em;
}
.side-brand img { width: 34px; height: 34px; border-radius: 11px; flex: none; }
.side-nav, .side-list { display: flex; flex-direction: column; gap: 2px; }
.side-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 6px 9px;
  border-radius: 17px; color: var(--text-2); text-decoration: none; text-align: left;
  font-size: 14.5px; font-weight: 650;
  transition: background .2s, color .2s, box-shadow .2s, transform .2s var(--spring);
}
.side-item:active { transform: scale(.97); }
.side-item.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.side-ic {
  width: 36px; height: 36px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
}
.side-ic .ic { width: 20px; height: 20px; }
.side-item.on .side-ic { color: var(--accent); }
.side-tile {
  width: 36px; height: 36px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  transition: background .2s, color .2s;
}
.side-tile .ic { width: 18px; height: 18px; }
.side-item.proj.on .side-tile { background: var(--accent); color: var(--on-accent); }
.side-txt { flex: 1; min-width: 0; }
.side-name { display: block; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-prog { display: block; height: 4px; margin-top: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.side-prog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-light), var(--accent)); }
.side-pct { flex: none; font-size: 12px; font-weight: 750; color: var(--text-3); }
.side-pct .ic { width: 16px; height: 16px; color: var(--ok); }
.side-item em { flex: none; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.side-label {
  display: flex; justify-content: space-between; margin: 20px 9px 8px;
  font-size: 11.5px; font-weight: 750; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em;
}
.side-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.side-new { height: 50px; margin-bottom: 8px; padding: 0 12px 0 16px; border-radius: 17px; font-size: 15px; justify-content: flex-start; }
.side-new .side-txt { text-align: left; }
.side-new kbd {
  flex: none; font: inherit; font-size: 11.5px; font-weight: 750; padding: 2px 7px; border-radius: 7px;
  background: color-mix(in srgb, var(--on-accent) 22%, transparent);
}

/* Icon rail */
@media (min-width: 720px) and (max-width: 1099px) {
  .side .side-txt, .side-label span { display: none; }
  .side-brand { justify-content: center; padding: 0; }
  .side-item { justify-content: center; padding: 6px 0; }
  .side-label { height: 1px; margin: 14px 12px; background: var(--line); }
  .side-new { width: 52px; height: 52px; padding: 0; margin: 0 auto 8px; justify-content: center; }
  .side-new .ic { width: 22px; height: 22px; }
}

/* =========================================================
   Screens
   ========================================================= */
@media (min-width: 720px) {
  .web .scroller {
    padding: 28px 36px 64px;
    scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
  }
  .web .scroller::-webkit-scrollbar { display: block; width: 10px; }
  .web .scroller::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
  .web .fab { display: none; }
  .web .head-theme, .web .head-acct { display: none; }
}
@media (max-width: 719px) {
  .web .head-new { display: none; }
}

/* ----- Overview */
.head-actions { display: flex; align-items: center; gap: 10px; }
.head-new { height: 50px; border-radius: 17px; font-size: 15px; }
@media (min-width: 720px) {
  .web .home-head { padding: 10px 4px 26px; }
  .web .large-title { font-size: 38px; }
}

.ov-top { display: grid; gap: 20px; margin-bottom: 30px; }
.ov-top .summary { margin-bottom: 0; }
.milestones { display: none; margin-top: 0; }
.ms-list { display: flex; flex-direction: column; gap: 2px; }
.ms-row {
  display: flex; align-items: center; gap: 12px; text-align: left;
  width: calc(100% + 16px); margin: 0 -8px; padding: 9px 8px; border-radius: 16px;
  transition: background .2s, transform .2s var(--spring);
}
.ms-row:active { transform: scale(.98); }
.ptile.sm { width: 40px; height: 40px; border-radius: 13px; }
.ptile.sm .ic { width: 19px; height: 19px; }
.ms-main { flex: 1; min-width: 0; }
.ms-main strong { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-main .sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-val { flex: none; font-size: 13.5px; font-weight: 750; color: var(--accent-strong); }
.ms-more { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; color: var(--text-3); }

@container main (min-width: 900px) {
  .ov-top { grid-template-columns: minmax(0, 1.7fr) minmax(290px, 1fr); }
  .milestones { display: block; }
  .ov-top .summary {
    display: grid; column-gap: 36px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: 1fr auto;
    grid-template-areas: "top bars" "foot bars";
  }
  .ov-top .sum-top { grid-area: top; }
  .ov-top .sum-bars { grid-area: bars; height: auto; min-height: 150px; margin-top: 0; }
  .ov-top .sum-foot { grid-area: foot; }
  .ov-top .sum-value { font-size: 54px; }
}

.web .sec-head { align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 15px; background: var(--surface-2); }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 11px;
  font-size: 13px; font-weight: 650; color: var(--text-2);
  transition: background .2s, color .2s, box-shadow .2s;
}
.seg button span { font-size: 11.5px; font-weight: 750; color: var(--text-3); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.pgrid .pcard { margin-bottom: 0; transition: transform .3s var(--spring), box-shadow .3s; }
.web .pgrid.anim .pcard { animation: rise .45s var(--ease) both; animation-delay: calc(var(--d, 0) * 40ms); }
.pg-empty { grid-column: 1 / -1; text-align: center; padding: 28px 8px; }

@media (min-width: 720px) {
  .web .empty { max-width: 440px; margin: 4vh auto 0; }
}

/* ----- Project detail */
@media (min-width: 720px) {
  .web .topbar { gap: 14px; padding: 14px max(36px, calc((100% - 1180px) / 2)); }
  .web .topbar-title {
    display: flex; align-items: center; gap: 6px; text-align: left;
    font-size: 15px; opacity: 1; transform: none;
  }
  .web .detail .scroller { padding-top: 88px; }
}
.crumb { color: var(--text-2); font-weight: 600; text-decoration: none; transition: color .2s; }
.crumb-sep { display: flex; }
.crumb-sep .ic { width: 16px; height: 16px; color: var(--text-3); }
.crumb-cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.tb-log { height: 44px; border-radius: 15px; }
@media (max-width: 719px) {
  .crumb, .crumb-sep, .tb-log { display: none; }
}

.web .detail .wrap { max-width: 640px; }
.detail-grid { display: flex; flex-direction: column; gap: 14px; }
.detail-grid .col { display: contents; }
.detail-grid .card, .detail-grid .grid2 { margin-top: 0; }
.detail-grid .hero { order: 1; }
.detail-grid .fc-card { order: 2; }
.detail-grid .stats { order: 3; }
.detail-grid .act-card { order: 4; }
.detail-grid .cal-card { order: 5; }
.detail-grid #sessions { order: 6; }

@container main (min-width: 900px) {
  .web .detail .wrap { max-width: 1180px; }
  .detail-grid {
    display: grid; align-items: start; gap: 20px;
    grid-template-columns: minmax(330px, 400px) minmax(0, 1fr);
  }
  .detail-grid .col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .detail-grid .hero {
    overflow: hidden; padding: 26px 22px 22px;
    background: var(--surface); border-radius: 32px; box-shadow: var(--shadow);
  }
  .detail-grid .act-card .bars { height: 150px; gap: 5px; }
  .detail-grid .act-card .bars .b span { font-size: 10px; }
}
@container main (min-width: 1150px) {
  .detail-grid .stats { grid-template-columns: repeat(4, 1fr); }
}

.cal-card .cal-title { touch-action: auto; }
.cal-card .cal-title h2 { font-size: 20px; }
.cal-card .cday { aspect-ratio: auto; height: 52px; }
.cal-card .cday.finish::after { box-shadow: 0 0 0 2px var(--surface); }
.cal-card .day-panel { background: var(--surface-2); }
.cal-card.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 25% { box-shadow: var(--shadow), 0 0 0 3px var(--accent); } }

.web .hist-row { width: calc(100% + 20px); margin: 0 -10px; padding: 11px 10px; border-radius: 16px; }
.web .hist-row:last-child { padding-bottom: 11px; }

/* =========================================================
   Account (sidebar foot + home header)
   ========================================================= */
.avatar {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 800;
}
.side-item.acct .side-ic { background: none; }
.acct-mail { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-acct .avatar { width: 34px; height: 34px; }
.pop.up { transform-origin: bottom left; animation-name: popUp; }
@keyframes popUp { from { opacity: 0; transform: translateY(4px) scale(.92); } }

/* ----- Account sheet */
.acct-info { margin: 18px 0 0; display: grid; gap: 8px; }
.acct-info > div {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border-radius: 18px; background: var(--surface-2);
}
.acct-info dt { flex: none; font-size: 13px; font-weight: 700; color: var(--text-2); }
.acct-info dd { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; margin: 0; font-size: 14.5px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.sheet .field-hint { margin-top: 8px; }

/* =========================================================
   Boot splash
   ========================================================= */
.splash {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg);
  transition: opacity .3s;
}
.splash img { border-radius: 22px; animation: splashPulse 1.6s ease-in-out infinite; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes splashPulse { 50% { opacity: .55; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { .splash img { animation: none; } }

/* =========================================================
   Auth screens (login, register, reset, confirm, check-email)
   ========================================================= */
body.auth .side { display: none; }
body.auth { --side-w: 0px; }
.web .screen.auth-screen .scroller { padding: 28px 20px; }
.auth-theme { position: absolute; top: 18px; right: 18px; z-index: 2; }
.auth-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 400px; padding: 8px 0 24px; }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand img { width: 56px; height: 56px; border-radius: 18px; }
.auth-brand h1 { margin: 12px 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -.045em; }
.auth-brand p { margin: 0 auto; max-width: 280px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.auth-head { text-align: center; margin-bottom: 4px; }
.auth-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.auth-head p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.auth-body .btn.block { height: 54px; border-radius: 18px; font-size: 16px; }
.auth-body form .btn.primary { margin-top: 20px; }
.auth-body > .btn.block { margin-top: 10px; }
.auth-body a.btn { text-decoration: none; }
.auth-aux { display: flex; justify-content: flex-end; margin-top: 4px; }
.auth-aux .btn.text { height: 36px; padding: 0 6px; }

.field.has-eye input { padding-right: 56px; }
.eye {
  position: absolute; top: 10px; right: 8px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
}
.eye .ic { width: 20px; height: 20px; }
.field.bad input { border-color: var(--danger); }
.field-err, .form-err { color: var(--danger); font-size: 13px; font-weight: 600; line-height: 1.4; }
.field-err { padding: 0 4px; }
.field-err:not(:empty) { margin-top: 6px; }
.form-err { margin-top: 12px; text-align: center; }
.form-err:empty { display: none; }
.field-hint { margin: 8px 4px 0; color: var(--text-3); font-size: 13px; }

.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 4px; color: var(--text-3); font-size: 13px; font-weight: 650; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.g-slot { display: flex; justify-content: center; min-height: 44px; }
.g-slot > div { max-width: 100%; }

.auth-msg { text-align: center; padding-top: 10px; }
.auth-ic {
  display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 22px;
  background: var(--accent-soft); color: var(--accent-strong);
}
.auth-ic .ic { width: 28px; height: 28px; }
.auth-msg h2 { margin: 16px 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
.auth-msg p { margin: 0 auto 22px; max-width: 320px; color: var(--text-2); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.auth-msg p b { color: var(--text); font-weight: 700; }

.auth-legal { display: flex; justify-content: center; gap: 10px; margin: 28px 0 0; color: var(--text-3); font-size: 13px; }
.auth-legal a { color: var(--text-2); font-weight: 600; text-decoration: none; border-radius: 6px; }
.auth-legal a:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* =========================================================
   Legal pages (privacy.html, terms.html): static documents that scroll
   ========================================================= */
body.web.legal { height: auto; min-height: 100%; overflow: auto; }
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px 48px; }
.legal-wrap .side-brand { display: inline-flex; margin: 0; }
.legal-doc { padding: 28px 26px 30px; margin-top: 18px; }
.legal-doc h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.045em; }
.legal-meta { margin: 6px 0 0; color: var(--text-3); font-size: 13px; font-weight: 600; }
.legal-todo {
  margin: 20px 0 4px; padding: 12px 14px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; font-weight: 650; line-height: 1.5;
}
.legal-doc h2 { margin: 28px 0 8px; font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.legal-doc p, .legal-doc li { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.legal-doc p { margin: 0 0 10px; }
.legal-doc ul { margin: 0 0 10px; padding-left: 20px; }
.legal-doc b, .legal-doc code { color: var(--text); }
.legal-doc code { font-size: 13.5px; }
.legal-foot { margin: 18px 0 0; text-align: center; color: var(--text-3); font-size: 13px; }
.legal-foot a { color: var(--text-2); font-weight: 600; text-decoration: none; }

/* =========================================================
   Sheets → centered dialogs, menus, toast
   ========================================================= */
body.web #sheet-root { position: fixed; }
body.web #toast-root { position: fixed; left: var(--side-w); }
.web .confetti { position: fixed; }
.sheet-x { display: none; }

@media (min-width: 720px) {
  body.web #toast-root { bottom: 28px; }
  .web .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto;
    width: min(500px, calc(100% - 48px)); max-height: calc(100% - 64px);
    border-radius: 32px; opacity: 0;
    transform: translate(-50%, -46%) scale(.97);
    transition: transform .4s var(--sheet-ease), opacity .25s;
  }
  .web .sheet-wrap.open .sheet { transform: translate(-50%, -50%); opacity: 1; }
  .web .grabber { display: none; }
  .web .sheet-x { display: grid; position: absolute; top: 18px; right: 18px; z-index: 2; }
  .web .sheet-body { padding: 26px 28px; }
  .web .sheet-head { padding-right: 48px; touch-action: auto; }
}

.pop {
  position: fixed; z-index: 60; min-width: 220px; padding: 6px;
  background: var(--sheet); border-radius: 18px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  transform-origin: top right; animation: popIn .22s var(--spring) both;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.92); } }
.pop-item {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px;
  border-radius: 12px; text-align: left; font-size: 14.5px; font-weight: 650;
  transition: background .15s;
}
.pop-item .ic { width: 18px; height: 18px; color: var(--text-2); }
.pop-item:hover, .pop-item:focus-visible { background: var(--surface-2); outline: none; }
.pop-item.danger, .pop-item.danger .ic { color: var(--danger); }

/* =========================================================
   Recurring goals
   ========================================================= */
/* ----- Goal type selector (project sheet) */
.gtype { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gt {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 6px 12px;
  border-radius: 18px; background: var(--surface-2); border: 1.5px solid transparent; text-align: center;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--spring);
}
.gt:active { transform: scale(.95); }
.gt .ic { width: 22px; height: 22px; margin-bottom: 3px; color: var(--text-2); }
.gt b { font-size: 15px; font-weight: 750; }
.gt small { font-size: 12px; font-weight: 550; line-height: 1.25; color: var(--text-2); }
.gt.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.gt.on .ic, .gt.on b { color: var(--accent-strong); }
.target-box.tb-swap .tb-row, .target-box.tb-swap .ruler, .target-box.tb-swap .chips, .target-box.tb-swap .tb-hint { animation: tbSwap .26s var(--ease); }
@keyframes tbSwap { from { opacity: 0; transform: translateY(6px); } }

/* ----- Overview: status chips and the Recurring card */
:root { --warn: #D97706; } /* amber; text mixed 62% passes 4.5:1 on both themes */
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: color-mix(in srgb, var(--warn) 62%, var(--text)); }
.sum-foot.many { flex-wrap: wrap; }
.sum-foot.many > div { flex: 1 0 auto; }
.sum-foot.many b { white-space: nowrap; }
.ms-val.warn { color: color-mix(in srgb, var(--warn) 62%, var(--text)); }
.ms-val .ic { width: 18px; height: 18px; color: var(--ok); }
.rg-prog { display: block; height: 4px; margin: 6px 0 2px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rg-prog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-light), var(--accent)); }
.web .milestones.anim .ms-row { animation: rise .45s var(--ease) both; animation-delay: calc(var(--d, 0) * 40ms); }
.web .milestones.anim .ms-more, .web .milestones.anim > .hint, .web .milestones.anim .ms-panel > .hint { animation: rise .45s var(--ease) both; }

/* ----- Detail: outlook timeline mark and the past-periods chart */
.tl-mark { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text-2); } /* --text-3 is 2.4:1 on the track */
.tl-key { display: inline-flex; align-items: center; gap: 6px; }
.tl-key i { width: 3px; height: 12px; border-radius: 2px; background: var(--text-2); }

.detail-grid .past-card { order: 3; }
.past-bars .bt { position: relative; }
.past-bars .bt::after { /* per-bar dashed segments that join across the 6px gaps into one goal line */
  content: ""; position: absolute; left: -3px; right: -3px; bottom: var(--goal, 80%);
  border-top: 2px dashed color-mix(in srgb, var(--text-2) 70%, transparent); pointer-events: none;
}
.past-bars .b.miss .bt i { /* the outline keeps the bar edge at 3:1 or more against the card (the fill alone is 1.4–2.1:1) */
  background: color-mix(in srgb, var(--accent) 32%, var(--surface-2)); box-shadow: inset 0 0 0 1.5px var(--accent-strong);
}
.past-bars .b.pre span { opacity: .45; }
.past-card .legend i.lg-on { background: var(--accent); }
.past-card .legend i.lg-miss { background: color-mix(in srgb, var(--accent) 32%, var(--surface-2)); box-shadow: inset 0 0 0 1.5px var(--accent-strong); }
.past-card .legend i.lg-goal { width: 14px; height: 0; border-radius: 0; background: none; border-top: 2px dashed color-mix(in srgb, var(--text-2) 70%, transparent); }
@container main (min-width: 900px) { .detail-grid .past-card .bars { height: 150px; } }

/* ----- Detail: calendar week totals, session separators, log impact */
.cal-card.wk .cal-week, .cal-card.wk .cal-grid { grid-template-columns: repeat(7, 1fr) 42px; }
.wsum {
  display: grid; place-items: center; align-self: center; height: 30px; border-radius: 10px;
  font-size: 11px; font-weight: 750; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.wsum.met { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: color-mix(in srgb, var(--ok) 62%, var(--text)); } /* plain --ok is 2.6:1 in light */
.wsum.cur:not(.met) { color: var(--accent-strong); }

.hist-sep {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 2px 4px;
  font-size: 11.5px; font-weight: 750; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em;
}
.hist-list > .hist-sep:first-child { padding-top: 0; }
.hist-sep .num { display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0; }
.hist-sep .ic { width: 14px; height: 14px; color: var(--ok); }
.hist-sep.more-in { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }

.web .impact { flex-wrap: wrap; text-align: center; }

/* =========================================================
   Hover (pointer devices)
   ========================================================= */
@media (hover: hover) {
  .side-item:not(.on):hover { background: color-mix(in srgb, var(--surface) 65%, transparent); color: var(--text); }
  .crumb:hover { color: var(--accent-strong); }
  .web .pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 22px 40px -26px var(--accent); }
  .web .pcard:active { transform: scale(.985); }
  .web .icon-btn:hover { background: var(--surface-2); }
  .web .icon-btn.sm:hover { background: var(--surface-3); }
  .web .btn.primary:hover { filter: brightness(1.07); }
  .web .btn.tonal:hover { background: var(--accent-soft-2); }
  .web .btn.plain:hover { background: var(--surface-3); }
  .web .btn.text:hover { background: var(--surface-2); }
  .web .chip-btn:not(.on):hover, .web .dchip:not(.on):hover, .web .ig:not(.on):hover { background: var(--surface-3); }
  .web .target-box .chip-btn:not(.on):hover { background: var(--surface-3); }
  .web .gt:not(.on):hover { background: var(--surface-3); }
  .web .hist-row:hover, .web .ms-row:hover { background: var(--surface-2); }
  .web .menu-item:hover { background: var(--surface-3); }
  .web .cday[data-k]:not(.has):hover { background: var(--surface-2); }
  .web .cday.has:hover { filter: brightness(1.06); }
  .seg button:not(.on):hover { color: var(--text); }
  .auth-legal a:hover, .legal-foot a:hover { color: var(--accent-strong); }
}
