/* PostWatch Product v4 — focused role-aware Today workspace */
.pw4-today {
  --pw4-navy: var(--pw-navy-800, #123a62);
  --pw4-navy-deep: #0d2c4b;
  --pw4-steel: var(--pw-steel-600, #456e91);
  --pw4-gold: var(--pw-gold-600, #a87920);
  --pw4-surface: var(--pw-surface, var(--surface, #fff));
  --pw4-muted-surface: var(--pw-surface-muted, var(--surface-2, #edf2f7));
  --pw4-text: var(--pw-text, var(--text, #132235));
  --pw4-muted: var(--pw-text-muted, var(--text-muted, #506176));
  --pw4-border: var(--pw-border, var(--border, #d7e0e8));
  --pw4-danger: var(--pw-danger, #b42318);
  --pw4-warning: var(--pw-warning, #8a5300);
  --pw4-success: var(--pw-success, #157347);
  width: min(100%, 1440px);
  margin-inline: auto;
  color: var(--pw4-text);
  font-size: 17px;
  line-height: 1.55;
}

.pw4-today *, .pw4-today *::before, .pw4-today *::after { box-sizing: border-box; }
.pw4-today :where(a, button) { touch-action: manipulation; -webkit-tap-highlight-color: rgba(18, 58, 98, .12); }
.pw4-today :where(a, button):focus-visible { outline: 3px solid var(--focus-ring, #2d74da); outline-offset: 3px; }
.pw4-today h1, .pw4-today h2, .pw4-today p { text-wrap: pretty; }
.pw4-today strong, .pw4-metric strong { font-variant-numeric: tabular-nums; }

.pw4-today__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}

.pw4-eyebrow {
  margin: 0 0 8px;
  color: var(--pw4-steel);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pw4-today__intro h1 {
  max-width: 820px;
  margin: 0;
  color: var(--pw4-text);
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.pw4-today__lead {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--pw4-muted);
  font-size: 17px;
  line-height: 1.6;
}

.pw4-scope {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pw4-muted);
  font-size: 15px;
  font-weight: 700;
  cursor: default;
}
.pw4-scope svg { width: 20px; height: 20px; color: var(--pw4-success); }

.pw4-next {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  column-gap: 32px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 24px;
  background: var(--pw4-navy-deep);
  color: #fff;
  box-shadow: 0 20px 48px rgba(11, 32, 55, .14);
}

.pw4-next::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--pw4-gold);
  content: '';
}
.pw4-next--urgent::before { background: #ff8175; }
.pw4-next--attention::before { background: #f2bd63; }
.pw4-next--clear::before { background: #6ed6a1; }

.pw4-next__label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: #bbd0e5;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pw4-next__label em { color: #e8eef5; font-style: normal; letter-spacing: .02em; text-transform: none; }
.pw4-next__label-copy { display: inline-flex; align-items: center; gap: 9px; }
.pw4-next__label-copy svg { width: 22px; height: 22px; stroke-width: 2.25; }
.pw4-next h2 { align-self: end; margin: 0; color: #fff; font-size: clamp(27px, 2.6vw, 38px); line-height: 1.15; }
.pw4-next > p { max-width: 760px; margin: 12px 0 0; color: #d8e5f1; font-size: 17px; line-height: 1.58; }
.pw4-next > .pw4-action { grid-column: 2; grid-row: 2 / span 2; align-self: center; min-width: 190px; }

.pw4-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--pw4-border);
  border-radius: 12px;
  color: var(--pw4-text);
  background: var(--pw4-surface);
  cursor: pointer;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out, transform 120ms ease-out;
}
.pw4-action svg { width: 20px; height: 20px; flex: 0 0 auto; }
.pw4-action:hover { border-color: var(--pw4-steel); background: var(--pw4-muted-surface); }
.pw4-action:active { transform: scale(.985); }
.pw4-action--primary { border-color: #fff; background: #fff; color: #0d2c4b; box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.pw4-action--primary:hover { border-color: #dceafa; background: #eef6ff; }
.pw4-action--text { min-height: 44px; padding-inline: 10px; border-color: transparent; background: transparent; color: var(--pw4-navy); }

.pw4-section { margin-top: 30px; }
.pw4-section__head, .pw4-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.pw4-section__head h2, .pw4-panel__head h2 { margin: 0; color: var(--pw4-text); font-size: 22px; line-height: 1.25; }
.pw4-section__head p, .pw4-panel__head > span { margin: 0; color: var(--pw4-muted); font-size: 14px; font-weight: 650; }
.pw4-heading { display: inline-flex; align-items: center; gap: 10px; }
.pw4-heading__icon { width: 26px; height: 26px; display: inline-grid; place-items: center; flex: 0 0 auto; color: var(--pw4-navy); cursor: default; }
.pw4-heading__icon svg { width: 22px; height: 22px; stroke-width: 2.2; }

.pw4-priority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pw4-priority {
  position: relative;
  min-width: 0;
  min-height: 168px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 12px 14px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--pw4-border);
  border-radius: 18px;
  background: var(--pw4-surface);
  color: var(--pw4-text);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 7px 22px rgba(11, 32, 55, .045);
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, transform 140ms ease-out, background-color 180ms ease-out;
}
.pw4-priority:hover { border-color: color-mix(in srgb, var(--pw4-steel) 65%, var(--pw4-border)); box-shadow: 0 14px 28px rgba(11, 32, 55, .09); }
.pw4-priority:active { transform: scale(.99); }
.pw4-priority__rail { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--pw4-steel); }
.pw4-priority--urgent .pw4-priority__rail { background: var(--pw4-danger); }
.pw4-priority--attention .pw4-priority__rail { background: var(--pw4-warning); }
.pw4-priority--clear .pw4-priority__rail { background: var(--pw4-success); }
.pw4-priority__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--pw4-muted-surface); color: var(--pw4-navy); }
.pw4-priority--urgent .pw4-priority__icon { background: color-mix(in srgb, var(--pw4-danger) 11%, var(--pw4-surface)); color: var(--pw4-danger); }
.pw4-priority__icon svg { width: 23px; height: 23px; }
.pw4-priority__copy { min-width: 0; }
.pw4-priority__copy strong { display: block; overflow-wrap: anywhere; color: var(--pw4-text); font-size: 18px; line-height: 1.3; }
.pw4-priority__copy small { display: block; margin-top: 6px; overflow-wrap: anywhere; color: var(--pw4-muted); font-size: 15px; line-height: 1.5; }
.pw4-priority__side { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--pw4-border); }
.pw4-priority__side em { color: var(--pw4-muted); font-size: 14px; font-style: normal; font-weight: 700; }
.pw4-priority__action { display: inline-flex; align-items: center; gap: 7px; color: var(--pw4-navy); font-size: 14px; font-weight: 800; }
.pw4-priority__action svg { width: 18px; height: 18px; color: currentColor; }

.pw4-today__lower { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; margin-top: 28px; }
.pw4-panel { min-width: 0; padding: 22px; border: 1px solid var(--pw4-border); border-radius: 18px; background: var(--pw4-surface); box-shadow: 0 7px 22px rgba(11, 32, 55, .04); }
.pw4-panel--activity { margin-top: 16px; }
.pw-launch-alerts { display: flex; align-items: center; gap: 20px; margin-top: 20px; grid-column: 1 / -1; }
.pw-launch-alerts[hidden] { display: none !important; }
.pw-launch-alerts__copy { flex: 1; min-width: 0; }
.pw-launch-alerts h2 { margin: 0; font-size: 18px; line-height: 1.35; color: var(--pw4-text); }
.pw-launch-alerts p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--pw4-muted); overflow-wrap: anywhere; }
.pw-launch-alerts > button { flex: 0 0 auto; font: inherit; }
@media (max-width: 767px) {
  .pw-launch-alerts { align-items: stretch; flex-direction: column; gap: 14px; }
  .pw-launch-alerts > button { width: 100%; }
}
.pw4-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pw4-metric { min-width: 0; padding: 16px; border-radius: 14px; background: var(--pw4-muted-surface); }
.pw4-metric { cursor: default; }
.pw4-metric > span { display: block; color: var(--pw4-muted); font-size: 14px; font-weight: 700; }
.pw4-metric > .pw4-metric__label { display: flex; align-items: center; gap: 7px; }
.pw4-metric__label svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--pw4-steel); stroke-width: 2.2; }
.pw4-metric strong { display: block; margin-top: 4px; overflow-wrap: anywhere; color: var(--pw4-text); font-size: clamp(24px, 2.5vw, 34px); line-height: 1.1; }
.pw4-metric small { display: block; margin-top: 7px; color: var(--pw4-muted); font-size: 14px; line-height: 1.45; }
.pw4-metric--attention { background: color-mix(in srgb, var(--pw4-warning) 9%, var(--pw4-surface)); }
.pw4-metric--attention strong { color: var(--pw4-warning); }
.pw4-metric--danger { background: color-mix(in srgb, var(--pw4-danger) 9%, var(--pw4-surface)); }
.pw4-metric--danger strong { color: var(--pw4-danger); }
.pw4-truth-note { margin: 14px 0 0; padding: 12px 14px; border-left: 4px solid var(--pw4-steel); border-radius: 0 10px 10px 0; background: var(--pw4-muted-surface); color: var(--pw4-muted); font-size: 14px; line-height: 1.5; }

.pw4-waiting-list, .pw4-activity-list { display: grid; gap: 8px; }
.pw4-waiting-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--pw4-text);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 180ms ease-out, border-color 180ms ease-out;
}
.pw4-waiting-row:hover { border-color: var(--pw4-border); background: var(--pw4-muted-surface); }
.pw4-waiting-row strong { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--pw4-muted-surface); color: var(--pw4-navy); font-size: 18px; }
.pw4-waiting-row span { min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 680; }
.pw4-waiting-row svg { width: 18px; height: 18px; color: var(--pw4-muted); }

.pw4-soft-empty { min-height: 86px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; border: 1px dashed var(--pw4-border); border-radius: 14px; background: var(--pw4-muted-surface); color: var(--pw4-muted); text-align: center; }
.pw4-soft-empty svg { width: 22px; height: 22px; color: var(--pw4-success); }
.pw4-soft-empty p { margin: 0; font-size: 15px; }

.pw4-activity-row { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.pw4-activity-row + .pw4-activity-row { border-top: 1px solid var(--pw4-border); border-top-left-radius: 0; border-top-right-radius: 0; }
.pw4-activity-row__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--pw4-success) 12%, var(--pw4-surface)); color: var(--pw4-success); }
.pw4-activity-row__icon svg { width: 18px; height: 18px; }
.pw4-activity-row > span:nth-child(2) { min-width: 0; }
.pw4-activity-row strong, .pw4-activity-row small { display: block; overflow-wrap: anywhere; }
.pw4-activity-row strong { color: var(--pw4-text); font-size: 15px; }
.pw4-activity-row small { margin-top: 3px; color: var(--pw4-muted); font-size: 14px; }
.pw4-activity-row time { color: var(--pw4-muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.dark .pw4-next, [data-theme="dark"] .pw4-next { background: #102c47; border-color: #38536b; }
.dark .pw4-action--primary, [data-theme="dark"] .pw4-action--primary { background: #f3f7fb; color: #0b2037; }
.dark .pw4-priority, .dark .pw4-panel,
[data-theme="dark"] .pw4-priority, [data-theme="dark"] .pw4-panel {
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

/* Expanded and wide screens use the canvas instead of stretching a phone
   stack. The action lane stays left; completeness and handoffs stay visible
   on the right without pushing the day's decisions below the fold. */
@media (min-width: 1280px) {
  .pw4-today {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .95fr);
    grid-template-areas:
      "intro intro"
      "next support"
      "priorities support"
      "activity activity";
    gap: 24px;
  }
  .pw4-today__intro { grid-area: intro; margin-bottom: 0; }
  .pw4-next { grid-area: next; }
  .pw4-section { grid-area: priorities; margin-top: 0; }
  .pw4-priority-grid { grid-template-columns: 1fr; }
  .pw4-priority, .pw4-priority:last-child:nth-child(odd) { grid-column: auto; min-height: 142px; }
  .pw4-today__lower { grid-area: support; grid-template-columns: 1fr; align-content: start; margin-top: 0; }
  .pw4-panel--activity { grid-area: activity; margin-top: 0; }
}

@media (max-width: 1180px) {
  .pw4-priority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pw4-priority:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 140px; }
  .pw4-today__lower { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .pw4-today__intro { align-items: flex-start; }
  .pw4-next { grid-template-columns: 1fr; min-height: 0; }
  .pw4-next > .pw4-action { grid-column: 1; grid-row: auto; width: 100%; margin-top: 22px; }
  .pw4-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .pw4-today { font-size: 16px; }
  .pw4-today__intro { display: block; margin-bottom: 18px; }
  .pw4-today__intro h1 { font-size: clamp(30px, 9vw, 38px); }
  .pw4-today__lead { margin-top: 9px; font-size: 16px; }
  .pw4-scope { max-width: 100%; min-height: 44px; margin-top: 14px; overflow-wrap: anywhere; border-radius: 12px; }
  .pw4-next { padding: 24px 20px; border-radius: 18px; }
  .pw4-next__label { align-items: flex-start; }
  .pw4-next h2 { font-size: 26px; }
  .pw4-next > p { font-size: 16px; }
  .pw4-section { margin-top: 24px; }
  .pw4-section__head { align-items: flex-end; }
  .pw4-section__head h2, .pw4-panel__head h2 { font-size: 20px; }
  .pw4-priority-grid { grid-template-columns: 1fr; }
  .pw4-priority, .pw4-priority:last-child:nth-child(odd) { grid-column: auto; min-height: 0; padding: 17px; }
  .pw4-priority__copy strong { font-size: 17px; }
  .pw4-panel { padding: 18px; border-radius: 16px; }
  .pw4-metric-grid { grid-template-columns: 1fr; }
  .pw4-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 14px; }
  .pw4-metric strong { grid-column: 2; grid-row: 1 / span 2; font-size: 28px; }
  .pw4-metric small { grid-column: 1; margin-top: 3px; }
  .pw4-activity-row { grid-template-columns: 38px minmax(0, 1fr); }
  .pw4-activity-row time { grid-column: 2; }
  .pw4-panel__head .pw4-action { padding-inline: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .pw4-today *, .pw4-today *::before, .pw4-today *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .pw4-next, .pw4-priority, .pw4-panel { border: 2px solid CanvasText; }
  .pw4-priority__rail, .pw4-next::before { background: Highlight; }
}
