/* Pointally Home — structural styles for the static Summary page. */
#ptHomeV2 {
  padding: 0 0 18px;
  color: var(--ink);
  --home-radius: 27px;
  --ph-type-section: 22px;
  --ph-type-title: 15px;
  --ph-type-body: 15px;
  --ph-type-label: 13px;
  --ph-type-caption: 12px;
  --ph-type-support: 21px;
  --ph-type-summary: 30px;
  --ph-secondary: color-mix(in srgb,var(--muted) 78%,var(--ink));
}


/* The viewport remains the native iOS scroller. Home hides only its visual
   scroll indicator and keeps vertical rubber-band behavior intact. */
body.view-home,
html:has(body.view-home) {
  scrollbar-width: none;
  overscroll-behavior-y: auto;
}
body.view-home::-webkit-scrollbar,
html:has(body.view-home)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Today is the canonical surface for every standard Home card. */
.ph-hero,
.ph-box {
  overflow: hidden;
  border: .5px solid rgba(127,127,127,.13);
  border-radius: var(--home-radius);
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 28px rgba(0,0,0,.04);
}
.ph-hero {
  padding: 16px;
}
.ph-hero-top,
.ph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ph-main {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: end;
  gap: 12px;
  margin-top: 10px;
}
.ph-score {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.ph-score b {
  display: block;
  font-size: clamp(2.15rem, 10vw, 2.65rem);
  font-weight: 780;
  letter-spacing: -.065em;
  line-height: .88;
}
.ph-score span {
  display: block;
  margin-top: 4px;
  color: var(--ph-secondary);
  font-size: var(--ph-type-label);
  font-weight: 620;
  letter-spacing: 0;
}
.ph-time,
.ph-today-ppd {
  min-width: 48px;
  padding-bottom: 2px;
  text-align: right;
}
.ph-today-ppd {
  padding-left: 16px;
  border-left: .5px solid var(--line,rgba(60,60,67,.15));
}
.ph-time b,
.ph-today-ppd b {
  display: block;
  font-size: .98rem;
  font-weight: 740;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ph-time small,
.ph-today-ppd small {
  display: block;
  margin-top: 6px;
  color: var(--ph-secondary);
  font-size: var(--ph-type-label);
  font-weight: 560;
  white-space: nowrap;
}
.ph-sub {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: .5px solid var(--line,rgba(60,60,67,.15));
  color: var(--ph-secondary);
  font-size: var(--ph-type-body);
  font-weight: 540;
  line-height: 1.42;
}
.ph-today-empty-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb,var(--blue) 12%,transparent);
  color: var(--blue);
  font: inherit;
  font-size: var(--ph-type-label);
  font-weight: 700;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.ph-today-empty-action[hidden] { display: none; }
.ph-today-empty-action:active { opacity: .62; }
.ph-hero.is-empty {
  padding: 12px 14px 13px;
}
.ph-hero.is-empty .ph-main,
.ph-hero.is-empty .ph-status-breakdown {
  display: none;
}
.ph-hero.is-empty .ph-sub {
  display: flex;
  min-height: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  padding-top: 0;
  border-top: 0;
  color: var(--ph-secondary);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -.006em;
  line-height: 1.25;
  white-space: nowrap;
}
.ph-hero.is-empty .ph-sub span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ph-section { margin-top: 20px; }

/* Canonical Home Work Update */
.ph-work-update {
  margin: 0 0 var(--pt-space-5);
}
.ph-work-update[hidden] { display: none; }
.ph-update-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) 44px;
  align-items: start;
}
.ph-update-main,
.ph-update-close {
  margin: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ph-update-main {
  display: grid;
  min-width: 0;
  min-height: 88px;
  grid-template-columns: 36px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 4px 14px 14px;
  text-align: left;
}
.ph-update-main:active {
  background: var(--fill);
}
.ph-update-main:focus-visible,
.ph-update-close:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.ph-update-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb,var(--blue) 12%,transparent);
  color: var(--blue);
}
.ph-update-icon svg {
  width: 21px;
  height: 21px;
}
.ph-update-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.ph-update-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font-size: .66rem;
  font-weight: 680;
  line-height: 1.2;
}
.ph-update-meta time {
  color: var(--muted);
  font-weight: 560;
}
.ph-update-copy strong {
  color: var(--ink);
  font-size: .94rem;
  font-weight: 720;
  letter-spacing: -.018em;
  line-height: 1.25;
}
.ph-update-message {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
}
.ph-update-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  justify-self: center;
  margin-top: 12px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--muted);
}
.ph-update-close:active {
  background: color-mix(in srgb,var(--muted) 18%,transparent);
}
.ph-update-close svg {
  width: 13px;
  height: 13px;
}

.ph-week-carousel {
  display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory;
  overscroll-behavior-inline:contain; scrollbar-width:none; -webkit-overflow-scrolling:touch;
  touch-action:pan-x pan-y;
}
.ph-week-carousel::-webkit-scrollbar { display:none; }
.ph-week-slide { flex:0 0 100%; min-width:0; scroll-snap-align:start; scroll-snap-stop:always; }
.ph-week-pages { display:flex; justify-content:center; gap:5px; height:12px; padding-top:7px; }
.ph-week-pages i { width:5px; height:5px; border-radius:50%; background:rgba(120,120,128,.24); transition:background .18s,transform .18s; }
.ph-week-pages i.active { background:rgba(60,60,67,.72); transform:scale(1.08); }
@media(prefers-color-scheme:dark) {
  .ph-week-pages i { background:rgba(235,235,245,.24); }
  .ph-week-pages i.active { background:rgba(235,235,245,.72); }
}
.ph-head { padding: 0 var(--pt-title-inset) 9px; }
.ph-summary > .ph-head {
  grid-column: 1 / -1;
  padding: 0 0 2px;
}
.ph-title {
  font-size: var(--ph-type-section);
  font-weight: 740;
  letter-spacing: -.018em;
}
.ph-detail {
  color: var(--ph-secondary);
  font-size: var(--ph-type-title);
  font-weight: 560;
  white-space: nowrap;
}
.ph-summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  min-height: 0;
  gap: 12px;
  padding: 16px;
}
.ph-summary-main b {
  display: block;
  font-size: var(--ph-type-summary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}
.ph-summary-main span,
.ph-summary-side span,
.ph-ppd-copy span {
  display: block;
  margin-top: 3px;
  color: var(--ph-secondary);
  font-size: var(--ph-type-label);
}
.ph-summary-side,
.ph-ppd-copy { text-align: right; }
.ph-summary-side b {
  font-size: var(--ph-type-support);
  font-variant-numeric: tabular-nums;
}
.ph-status-breakdown {
  grid-column: 1 / -1;
  min-width: 0;
  padding-top: 8px;
  border-top: .5px solid var(--line,rgba(60,60,67,.12));
  color: var(--ph-secondary);
  font-size: var(--ph-type-caption);
  font-weight: 560;
  letter-spacing: .005em;
  line-height: 1.25;
}
.ph-status-breakdown--today {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}
.ph-month-summary-card {
  grid-template-columns: minmax(0,1fr) auto;
}
.ph-month-summary-card > .ph-head {
  grid-column: 1 / -1;
  grid-row: 1;
}
.ph-month-summary-card .ph-summary-main {
  grid-column: 1;
  grid-row: 2;
}
.ph-month-metrics {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: repeat(2,auto);
  align-items: center;
}
.ph-month-metric {
  min-width: 58px;
  padding: 0 12px;
  border-left: .5px solid var(--line,rgba(60,60,67,.15));
  text-align: right;
}
.ph-month-metric:first-child {
  border-left: 0;
}
.ph-month-metric:last-child {
  padding-right: 0;
}
.ph-month-metric b,
.ph-month-metric span {
  display: block;
  white-space: nowrap;
}
.ph-month-metric b {
  color: var(--ink);
  font-size: var(--ph-type-support);
  font-weight: 740;
  font-variant-numeric: tabular-nums;
}
.ph-month-metric span {
  margin-top: 3px;
  color: var(--ph-secondary);
  font-size: var(--ph-type-caption);
}
.ph-month-summary-card > .ph-ppd-goal {
  grid-row: 3;
}
.ph-month-summary-card > .ph-status-breakdown {
  grid-row: 4;
}
.ph-month-summary-card,
.ph-week-summary-card { cursor:pointer; -webkit-tap-highlight-color:transparent; }
.ph-month-summary-card:focus-visible,
.ph-week-summary-card:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.ph-status-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.ph-status-item {
  appearance: none;
  min-width: 0;
  padding: 7px 3px 6px;
  border: 0;
  border-left: .5px solid var(--line,rgba(60,60,67,.15));
  border-radius: 0;
  background: transparent;
  color: var(--ph-secondary);
  font: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease,opacity .12s ease;
}
.ph-status-item:first-child { border-left: 0; }
.ph-status-item:active {
  background: color-mix(in srgb,var(--pt-insight-a,var(--blue)) 10%,transparent);
  opacity: .78;
}
.ph-status-item:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.ph-status-item span,
.ph-status-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ph-status-item span {
  font-size: var(--ph-type-caption);
  color: var(--ph-secondary);
  font-weight: 620;
}
.ph-status-item b {
  display: block;
  margin: 3px 0 2px;
  color: var(--ink);
  font-size: var(--ph-type-support);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ph-status-item small {
  color: var(--ph-secondary);
  font-size: var(--ph-type-caption);
  font-weight: 560;
}
.ph-status-breakdown .is-projected {
  margin-top: 7px;
  color: var(--ph-secondary);
  font-size: var(--ph-type-caption);
  text-align: right;
}
.ph-shot-note { color: var(--muted); }
.ph-shot-note strong {
  color: var(--blue);
  font-weight: 720;
}
.ph-ppd {
  display: grid;
  justify-items: end;
  min-width: 62px;
  padding-left: 14px;
  border-left: .5px solid var(--line,rgba(60,60,67,.15));
}
.ph-ppd-copy { text-align: right; }
.ph-ppd-copy b {
  display: block;
  font-size: 1.12rem;
  font-weight: 740;
  font-variant-numeric: tabular-nums;
}
.ph-ppd-goal {
  display: grid;
  grid-column: 1 / -1;
  gap: 5px;
  min-width: 0;
}
.ph-ppd-goal-scale {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ph-secondary);
  font-size: var(--ph-type-caption);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ph-ppd-goal-scale span {
  font-weight: 560;
}
.ph-ppd-goal-scale b {
  color: var(--ph-secondary);
  font-weight: 650;
}
.ph-ppd-goal.is-ahead .ph-ppd-goal-scale b {
  color: #64d2ff;
}
.ph-meter {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127,127,127,.13);
  box-shadow: inset 0 0 0 .5px rgba(127,127,127,.12);
}
.ph-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width .45s cubic-bezier(.2,.8,.2,1), background .3s, filter .3s, box-shadow .3s;
}
.ph-meter.meets .ph-meter-fill { background: linear-gradient(90deg,#30d158,#a8f08d); }
.ph-meter.partial .ph-meter-fill { background: linear-gradient(90deg,#ff9f0a,#ffd60a); }
.ph-meter.none .ph-meter-fill { background: #636366; }
.ph-meter.exceeds .ph-meter-fill {
  background: linear-gradient(90deg,#0a84ff,#64d2ff);
  box-shadow: 0 0 8px rgba(10,132,255,.24);
}

/* Up Next is part of the Home structure; assignments render directly here. */
#phUpcoming .ph-title { margin-right: auto; }
#phUpcoming .pta-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
#ptHomeV2 #ptAssignmentsCard {
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#ptHomeV2 #ptaList {
  display: grid;
  gap: 14px;
  background: transparent;
}
#ptHomeV2 #ptaList.pta-empty {
  display: block;
  padding: 17px 16px;
  border: 1px solid color-mix(in srgb,var(--ink) 8%,transparent);
  border-radius: 16px;
  background: var(--card);
  color: var(--muted);
  font-size: .78rem;
}
#ptHomeV2 .pta-date-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}
#ptHomeV2 .pta-date-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}
#ptHomeV2 .pta-date-label {
  flex: 0 0 auto;
  color: color-mix(in srgb,var(--ink) 82%,var(--muted));
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
#ptHomeV2 .pta-date-card {
  overflow: hidden;
  border: 1px solid color-mix(in srgb,var(--ink) 8%,transparent);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
}
#ptHomeV2 .pta-worklog-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) 48px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 8px 10px 8px 14px;
  overflow: hidden;
  border: 0;
  border-bottom: .5px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transform: scale(1);
  transform-origin: center;
  transition: background-color .16s ease, transform .16s cubic-bezier(.22,.8,.3,1);
  -webkit-tap-highlight-color: transparent;
}
#ptHomeV2 .pta-worklog-row:active {
  background: var(--pressed);
  transform: scale(.98);
}
#ptHomeV2 .pta-worklog-row:focus-visible {
  outline: 3px solid color-mix(in srgb,var(--blue) 35%,transparent);
  outline-offset: -3px;
}
#ptHomeV2 .pta-worklog-row.is-opening {
  animation: ptaRowOpen .18s cubic-bezier(.2,.9,.3,1) both;
}
#ptHomeV2 .pta-worklog-content {
  display: grid;
  grid-template-rows: 20px 18px;
  align-content: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  row-gap: 2px;
}
#ptHomeV2 .pta-worklog-subject,
#ptHomeV2 .pta-worklog-secondary {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
#ptHomeV2 .pta-worklog-subject { gap: 5px; }
#ptHomeV2 .pta-worklog-subject > span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb,var(--ink) 96%,var(--muted));
  font-size: .82rem;
  font-weight: 720;
  letter-spacing: -.022em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ptHomeV2 .pta-worklog-job::before {
  margin-right: 5px;
  content: "·";
}
#ptHomeV2 .pta-worklog-name {
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb,var(--muted) 92%,var(--ink));
  font-size: .68rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ptHomeV2 .pta-worklog-tail {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 5px;
  min-width: 0;
}
#ptHomeV2 .pta-worklog-points {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: color-mix(in srgb,var(--ink) 92%,var(--muted));
  white-space: nowrap;
}
#ptHomeV2 .pta-worklog-points b {
  font-size: .74rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  line-height: 1;
}
#ptHomeV2 .pta-worklog-points span {
  color: var(--muted);
  font-size: .56rem;
  font-weight: 650;
}
#ptHomeV2 .pta-worklog-chevron {
  width: 7px;
  height: 12px;
  margin-right: 3px;
  color: color-mix(in srgb,var(--muted) 72%,transparent);
}
#ptHomeV2 #ptaSeeAll {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#ptHomeV2 #ptaSeeAll:active { background: var(--pressed); }
#ptHomeV2 .pta-upcoming-weather {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .61rem;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
}
#ptHomeV2 .pta-upcoming-weather.ready { color: color-mix(in srgb,var(--ink) 64%,var(--muted)); }
#ptHomeV2 .pta-weather-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}
#ptHomeV2 .pta-weather-item svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#ptHomeV2 .pta-weather-separator { color: var(--muted); opacity: .65; }
#ptHomeV2 .pta-weather-gust {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}
@keyframes ptaRowOpen {
  0% { transform: scale(.98); }
  58% { transform: scale(1.012); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #ptHomeV2 .pta-worklog-row {
    animation: none;
    transition: none;
  }
}

@media (max-width:380px) {
  .ph-summary {
    gap: 11px;
    padding-right: 15px;
    padding-left: 15px;
  }
  .ph-ppd {
    gap: 6px;
    padding-left: 10px;
  }
  .ph-meter { width: 52px; height: 8px; }
  .ph-summary-main b { font-size: 27px; }
}
@property --ph-glow-a-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 12%;
}
@property --ph-glow-a-y {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 14%;
}
@property --ph-glow-b-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 88%;
}
@property --ph-glow-b-y {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 86%;
}

/* Canonical ambient surfaces for standard Home summaries.
   Color lives in each card's real background: no overlays, masks, or pseudo-layers. */
.ph-hero,
.ph-week-summary-card,
.ph-month-summary-card {
  --ph-ambient-a: rgba(100,210,255,.07);
  --ph-ambient-b: rgba(94,92,230,.04);
  background-color: var(--card);
  background-image:
    radial-gradient(ellipse 72% 105% at var(--ph-glow-a-x) var(--ph-glow-a-y), var(--ph-ambient-a) 0%, transparent 72%),
    radial-gradient(ellipse 78% 112% at var(--ph-glow-b-x) var(--ph-glow-b-y), var(--ph-ambient-b) 0%, transparent 74%),
    linear-gradient(145deg, color-mix(in srgb,var(--card) 97%,#ffffff 3%), var(--card));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
}
.ph-week-summary-card,
.ph-month-summary-card {
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms ease;
}
.ph-week-summary-card:active,
.ph-month-summary-card:active {
  transform: scale(.995);
  box-shadow: 0 4px 16px rgba(0,0,0,.055);
}
#viewHome:not(.active) .ph-hero,
#viewHome:not(.active) .ph-week-summary-card,
#viewHome:not(.active) .ph-month-summary-card {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: no-preference) {
  .ph-hero,
  .ph-week-summary-card,
  .ph-month-summary-card {
    animation-name: phAmbientSurfaceDrift;
    animation-duration: 22s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ph-hero,
  .ph-week-summary-card,
  .ph-month-summary-card {
    animation: none;
  }
  .ph-week-summary-card:active,
  .ph-month-summary-card:active {
    transform: none;
  }
}
@keyframes phAmbientSurfaceDrift {
  0%, 100% {
    --ph-glow-a-x: 12%; --ph-glow-a-y: 14%;
    --ph-glow-b-x: 88%; --ph-glow-b-y: 86%;
  }
  25% {
    --ph-glow-a-x: 86%; --ph-glow-a-y: 16%;
    --ph-glow-b-x: 14%; --ph-glow-b-y: 84%;
  }
  50% {
    --ph-glow-a-x: 84%; --ph-glow-a-y: 84%;
    --ph-glow-b-x: 16%; --ph-glow-b-y: 16%;
  }
  75% {
    --ph-glow-a-x: 14%; --ph-glow-a-y: 82%;
    --ph-glow-b-x: 86%; --ph-glow-b-y: 18%;
  }
}


/* The Home header keeps actions only; the personal greeting is one page block. */
body.view-home #homeRangeLabel {
  display: none !important;
}
body.view-home .header-top {
  margin-bottom: 0 !important;
}
.ph-greeting {
  display: grid;
  gap: 4px;
  margin: 0 var(--pt-title-inset) 16px;
}
.ph-greeting h1,
.ph-greeting-guidance {
  font-size: 24px;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.ph-greeting h1 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}
.ph-greeting-guidance {
  display: flex;
  min-height: 26px;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}
.ph-greeting-guidance span {
  min-width: 0;
}
.ph-greeting-guidance button {
  flex: 0 0 auto;
  min-height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.ph-greeting-guidance button[hidden] { display: none; }
.ph-greeting-guidance button:active { opacity: .58; }

/* Home keeps only a compact weekly glance and one month-to-date PPD instrument. */
.ph-week-glance {
  display: grid;
  gap: 7px;
  box-sizing: border-box;
  padding: 12px 14px 13px;
  border: .5px solid color-mix(in srgb,var(--line,rgba(60,60,67,.15)) 88%,transparent);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ph-week-glance-metrics {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: end;
  gap: 14px;
}
.ph-week-glance-primary b,
.ph-week-glance-primary span,
.ph-week-glance-metric b,
.ph-week-glance-metric span {
  display: block;
  white-space: nowrap;
}
.ph-week-glance-primary b {
  font-size: 1.35rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.ph-week-glance-primary span,
.ph-week-glance-metric span {
  margin-top: 3px;
  color: var(--ph-secondary);
  font-size: var(--ph-type-caption);
  font-weight: 560;
}
.ph-week-glance-metric {
  padding-left: 12px;
  border-left: .5px solid var(--line,rgba(60,60,67,.15));
  text-align: right;
}
.ph-week-glance-metric b {
  font-size: 1rem;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.ph-week-glance:active { opacity: .72; }
.ph-week-glance:focus-visible,
.ph-mtd-pulse:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.ph-mtd-pulse {
  display: grid;
  gap: 7px;
  box-sizing: border-box;
  min-height: 0;
  margin: 14px var(--pt-title-inset) 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ph-mtd-pulse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ph-mtd-pulse-head span {
  color: var(--ph-secondary);
  font-size: .76rem;
  font-weight: 680;
  letter-spacing: .025em;
}
.ph-mtd-pulse-head strong {
  font-size: 1.05rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
}
.ph-mtd-pulse .ph-meter {
  height: 4px;
  background: color-mix(in srgb,var(--ink) 10%,transparent);
}
.ph-mtd-pulse:active { opacity: .74; }

/* The canonical Today card is a bounded horizontal day navigator.
   Preserve native vertical page scrolling while recognizing horizontal swipes. */
#phTodayCard {
  touch-action: pan-y;
  overscroll-behavior-inline: contain;
}
#phTodayCard:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}


/* Canonical unified Home card system.
   Every standard surface uses Today geometry; the MTD rail remains intentionally borderless. */
#ptHomeV2 {
  --home-section-gap: 16px;
  --home-card-padding: 16px;
  --home-card-shadow: 0 10px 30px rgba(28, 32, 48, .07);
  --home-rail-start: #304f8d;
  --home-rail-mid: #765078;
  --home-rail-lift: #9d7cab;
}
@media (prefers-color-scheme: dark) {
  #ptHomeV2 {
    --home-card-shadow: 0 12px 34px rgba(0, 0, 0, .22);
    --home-rail-start: #315d9e;
    --home-rail-mid: #824f82;
    --home-rail-lift: #aa82b2;
  }
}

/* One card shell: opaque fill, Today radius, no visible outline, restrained depth. */
#ptHomeV2 .ph-hero,
#ptHomeV2 .ph-week-glance,
#ptHomeV2 #ptaList {
  overflow: hidden;
  border: 0;
  border-radius: var(--home-radius);
  background-color: var(--card);
  background-image: none;
  box-shadow: var(--home-card-shadow);
  animation: none;
}
#ptHomeV2 .ph-hero,
#ptHomeV2 .ph-week-glance {
  padding: var(--home-card-padding);
}
#ptHomeV2 .ph-hero.is-empty {
  padding: var(--home-card-padding);
}
#ptHomeV2 .ph-hero.is-empty .ph-sub {
  margin-top: 6px;
}
#ptHomeV2 .ph-section {
  margin-top: var(--home-section-gap);
}

/* Shared title geometry removes the extra inset that made This Week drift right. */
#ptHomeV2 .ph-title {
  font-size: var(--ph-type-section);
  font-weight: 740;
  letter-spacing: -.018em;
  line-height: 1.16;
}
#ptHomeV2 .ph-week-glance > .ph-head {
  padding: 0 0 10px;
}
#ptHomeV2 #phUpcoming > .ph-head {
  padding-bottom: 10px;
}
#ptHomeV2 #phUpcoming .pta-add {
  display: none;
}

/* Weekly PPD leads; Points and Prod Days remain compact supporting metrics. */
#ptHomeV2 .ph-week-glance-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto;
  align-items: end;
  column-gap: 16px;
  row-gap: 0;
}
#ptHomeV2 .ph-week-glance-primary {
  display: contents;
}
#ptHomeV2 .ph-week-glance-primary b {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 1rem;
  font-weight: 720;
  text-align: right;
}
#ptHomeV2 .ph-week-glance-metric {
  padding-left: 13px;
  border-left: .5px solid var(--line, rgba(60, 60, 67, .15));
  text-align: right;
}
#ptHomeV2 .ph-week-glance-metric:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
}
#ptHomeV2 .ph-week-glance-metric:nth-child(3) {
  grid-column: 1;
  grid-row: 1;
  padding-left: 0;
  border-left: 0;
  text-align: left;
}
#ptHomeV2 .ph-week-glance-metric:nth-child(3) b {
  font-size: 1.55rem;
  font-weight: 780;
  letter-spacing: -.035em;
}
#ptHomeV2 .ph-week-glance-metric:nth-child(3) span {
  font-weight: 650;
}
#ptHomeV2 #phWeekTotalNote {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 10px;
  padding-top: 9px;
  border-top: .5px solid var(--line, rgba(60, 60, 67, .12));
  font-size: var(--ph-type-caption);
  line-height: 1.2;
}
#ptHomeV2 #phWeekTotalNote:not(.ph-shot-note) {
  display: none;
}

/* MTD is the sole borderless instrument and aligns to the shared 16pt rhythm. */
#ptHomeV2 .ph-mtd-pulse {
  gap: 8px;
  margin: 0 var(--pt-title-inset) var(--home-section-gap);
}
#ptHomeV2 .ph-mtd-pulse-head span {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
}
#ptHomeV2 .ph-mtd-pulse-head strong {
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -.025em;
}
#ptHomeV2 .ph-mtd-status {
  overflow: hidden;
  color: var(--ph-secondary);
  font-size: var(--ph-type-caption);
  font-weight: 560;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ptHomeV2 .ph-mtd-status[hidden] {
  display: none;
}
#ptHomeV2 .ph-mtd-pulse .ph-meter {
  height: 7px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--ink) 8%, transparent);
}
#ptHomeV2 .ph-mtd-pulse .ph-meter-fill {
  background-color: var(--home-rail-start);
  filter: none;
  box-shadow: 0 0 8px color-mix(in srgb, var(--home-rail-mid) 24%, transparent);
}
#ptHomeV2 .ph-mtd-pulse[data-performance="neutral"] {
  --home-rail-start: #8e8e93;
  --home-rail-mid: #aeaeb2;
  --home-rail-lift: #c7c7cc;
}
#ptHomeV2 .ph-mtd-pulse[data-performance="critical"] {
  --home-rail-start: #c62f3d;
  --home-rail-mid: #ff5c57;
  --home-rail-lift: #ff8a80;
}
#ptHomeV2 .ph-mtd-pulse[data-performance="warning"] {
  --home-rail-start: #c47908;
  --home-rail-mid: #f0b23f;
  --home-rail-lift: #ffd166;
}
#ptHomeV2 .ph-mtd-pulse[data-performance="goal"] {
  --home-rail-start: #178a4b;
  --home-rail-mid: #52cf73;
  --home-rail-lift: #86df99;
}
#ptHomeV2 .ph-mtd-pulse[data-performance="exceeds"] {
  --home-rail-start: #2866d8;
  --home-rail-mid: #8356d9;
  --home-rail-lift: #a487ef;
}
@media (prefers-reduced-motion: no-preference) {
  #ptHomeV2 .ph-mtd-pulse .ph-meter-fill {
    animation: phMtdRailAurora 12s ease-in-out infinite alternate;
  }
  #ptHomeV2 .ph-mtd-pulse[data-performance="neutral"] .ph-meter-fill {
    animation: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #ptHomeV2 .ph-mtd-pulse .ph-meter-fill {
    animation: phMtdRailStatic 1ms steps(1, end) both paused;
  }
}
@keyframes phMtdRailAurora {
  from {
    background-image: linear-gradient(105deg, var(--home-rail-start) 0%, var(--home-rail-mid) 30%, var(--home-rail-lift) 52%, var(--home-rail-mid) 74%, var(--home-rail-start) 100%);
    background-size: 220% 100%;
    background-position: 0% 50%;
    filter: saturate(1.02);
    box-shadow: 4px 0 7px color-mix(in srgb, var(--home-rail-mid) 28%, transparent);
  }
  to {
    background-image: linear-gradient(105deg, var(--home-rail-start) 0%, var(--home-rail-mid) 30%, var(--home-rail-lift) 52%, var(--home-rail-mid) 74%, var(--home-rail-start) 100%);
    background-size: 220% 100%;
    background-position: 100% 50%;
    filter: saturate(1.08);
    box-shadow: 5px 0 9px color-mix(in srgb, var(--home-rail-mid) 34%, transparent);
  }
}
@keyframes phMtdRailStatic {
  from, to {
    background-image: linear-gradient(90deg, var(--home-rail-start), var(--home-rail-mid));
    background-size: 100% 100%;
    background-position: 0 0;
    filter: none;
    box-shadow: 0 0 8px color-mix(in srgb, var(--home-rail-mid) 18%, transparent);
  }
}

/* Up Next is one inset-grouped card with two job rows and a native footer action. */
#ptHomeV2 #ptAssignmentsCard {
  overflow: visible;
}
#ptHomeV2 #ptaList {
  display: block;
  padding: 0;
}
#ptHomeV2 #ptaList.pta-empty {
  padding: var(--home-card-padding);
  color: var(--muted);
  font-size: .78rem;
}
#ptHomeV2 #ptaList .pta-worklog-row {
  min-height: 66px;
  padding: 11px 88px 11px var(--home-card-padding);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#ptHomeV2 #ptaList .pta-worklog-row + .pta-worklog-row {
  border-top: .5px solid var(--line, rgba(60, 60, 67, .15));
}
#ptHomeV2 #ptaList .pta-worklog-row.has-weather {
  min-height: 82px;
}
#ptHomeV2 #ptaSeeAll {
  min-height: 44px;
  margin: 0;
  border-top: .5px solid var(--line, rgba(60, 60, 67, .15));
  background: transparent;
}
#ptHomeV2 #ptaSeeAll:active,
#ptHomeV2 #ptaList .pta-worklog-row:active {
  background: var(--fill);
  opacity: 1;
}
