/* UI-070: the complete task-center composition. Scoped away from other views. */
body:has(#participant-view:not([hidden]):not(.workspace-focus)) {
  background: #0b352f;
}
#participant-view:not(.workspace-focus) {
  --task-paper: #f8f3e7;
  --task-green: #123f38;
  --task-gold: #e2b65e;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  width: min(1060px, calc(100% - 80px));
  min-height: 570px;
  margin: 52px auto 38px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 195, 128, .28);
  border-radius: 16px;
  background: #103e35;
  box-shadow: 0 20px 70px rgba(0, 20, 16, .18);
}
/* Never allow display:grid to override the application view switch. */
#participant-view[hidden] { display: none; }
#participant-view:not(.workspace-focus) .dashboard-hero {
  min-height: 0;
  padding: 0;
  color: #fff4de;
  border: 0;
  overflow: hidden;
  background: #123f38;
}
#participant-view:not(.workspace-focus) .dashboard-hero::before {
  display: block;
  background: url('/assets/brand-stage2/tai-long-wan-hero-documentary-v3-900.webp') 57% center / cover;
  filter: saturate(.8);
}
#participant-view:not(.workspace-focus) .dashboard-hero::after {
  display: block;
  background: linear-gradient(180deg, rgba(5, 37, 31, .16) 0%, rgba(5, 37, 31, .6) 34%, #103c33 80%);
}
#participant-view:not(.workspace-focus) .dashboard-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 174px 38px 36px;
  margin: 0;
}
#participant-view .participant-heading { position: relative; }
#participant-view:not(.workspace-focus) .dashboard-head h1 {
  margin: 0;
  padding: 0;
  font: 600 36px/1.3 var(--brand-display);
  letter-spacing: .015em;
  color: #fff4de;
  text-align: left;
}
#participant-view:not(.workspace-focus) #participant-meta {
  margin: 14px 0 0;
  color: #e4c887;
  font: 500 13px/1.6 var(--brand-ui);
  letter-spacing: .07em;
  font-variant-numeric: tabular-nums;
}
#participant-view .participant-state {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 9px;
  border: 1px solid rgba(243, 220, 169, .4);
  border-radius: 4px;
  color: #f6e6c3;
  background: rgba(9, 45, 36, .55);
  font: 500 12px/1.5 var(--brand-ui);
}
#participant-view:not(.workspace-focus) .identity-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 20px 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
#participant-view .identity-summary > div:first-child { display: none; }
#participant-view .identity-summary > div {
  display: grid;
  gap: 5px;
  border: 0;
  padding: 0;
}
#participant-view .identity-summary > div:last-child { text-align: right; }
#participant-view .identity-summary small { color: #c5d1c2; font-size: 12px; line-height: 1.5; }
#participant-view .identity-summary strong { color: #fff4de; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
#participant-view .participant-actions {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 10px;
  margin-top: auto;
  padding: 0;
}
#participant-view .signup-invite-entry { display: block; margin: 0; padding: 0; border: 0; background: none; }
#participant-view .participant-actions button {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 10px;
  border: 1px solid rgba(225, 196, 133, .55);
  border-radius: 6px;
  background: rgba(12, 47, 39, .5);
  color: #f5e6c5;
  box-shadow: none;
  text-decoration: none;
  font: 600 14px/1.5 var(--brand-ui);
  transition: background .16s, transform .16s;
}
#participant-view .participant-actions #open-signup-invite { background: #e2b65e; color: #123f38; border-color: #e2b65e; }
#participant-view .participant-actions button:hover { background: #28584a; }
#participant-view .participant-actions #open-signup-invite:hover { background: #f1ca7d; }
#participant-view .participant-actions button:active { transform: translateY(1px); }
#participant-view:not(.workspace-focus) .dashboard-body {
  width: 100%;
  margin: 0;
  padding: 38px 30px 20px;
  background: var(--task-paper);
}
#participant-view .participant-task-hub { padding: 0; margin: 0; }
#participant-view .participant-task-hub::before,
#participant-view .task-sequence-item::before,
#participant-view .task-sequence-item::after { display: none; }
#participant-view .core-task-sequence {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  list-style: none;
}
#participant-view .task-sequence-item,
#participant-view .task-sequence-item.is-current,
#participant-view .task-sequence-item.is-complete {
  display: block;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
#participant-view .task-sequence-item + .task-sequence-item { border-top: 1px solid #d4d6c7; }
#participant-view .task-sequence-item:last-child { border-top: 0; padding-top: 14px; }
#participant-view #service-panel { margin: 0; padding: 0; }
#participant-view .task-entry {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 130px;
  padding: 22px 10px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--task-green);
  text-align: left;
  font-family: var(--brand-ui);
  cursor: pointer;
  box-shadow: none;
  transition: background .16s, transform .16s;
}
#participant-view .task-entry:hover { background: #ece8d9; }
#participant-view .task-entry:active { transform: translateY(1px); }
#participant-view .task-entry:focus-visible { outline: 3px solid #aa751a; outline-offset: 3px; }
#participant-view .task-entry-number {
  color: #967126;
  font: 400 25px/1 var(--brand-data);
  letter-spacing: -.05em;
}
#participant-view .task-entry-copy { display: grid; gap: 8px; min-width: 0; }
#participant-view .task-entry-copy strong { display: block; color: inherit; font: 600 21px/1.35 var(--brand-ui); }
#participant-view .task-entry-hint { display: block; color: #506257; font: 400 14px/1.6 var(--brand-ui); overflow-wrap: anywhere; }
#participant-view .task-entry-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
#participant-view .task-entry-status { color: #366249; font: 600 12px/1.4 var(--brand-ui); white-space: nowrap; }
#participant-view .task-entry-status::before { content: '✓ '; }
#participant-view .task-entry-arrow { color: #9b722a; font: 400 24px/1 var(--brand-ui); }
#participant-view .task-entry-primary { padding: 24px 18px; min-height: 126px; background: #123f38; color: #fff4de; border-radius: 8px; }
#participant-view .task-entry-primary:hover { background: #20564a; }
#participant-view .task-entry-primary .task-entry-hint { color: #ccd9cd; }
#participant-view .task-entry-primary .task-entry-number,
#participant-view .task-entry-primary .task-entry-arrow { color: #e2b65e; }
#participant-view .task-entry:disabled { cursor: not-allowed; opacity: .52; transform: none; }
#participant-view .identity-summary-help { margin: 14px 0 0; padding: 0; border: 0; }
#participant-view .identity-summary-help summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 4px; color: #586b5e; font: 400 12px/1.5 var(--brand-ui); list-style: none; cursor: pointer; }
#participant-view .identity-summary-help summary::-webkit-details-marker { display: none; }
#participant-view .identity-summary-help summary span { font-size: 18px; }
#participant-view .identity-summary-help[open] summary span { transform: rotate(45deg); }
#participant-view .identity-summary-help p { margin: 0; padding: 4px; font: 400 13px/1.7 var(--brand-ui); color: #506257; }
#participant-view:has(.identity-summary.needs-resolution) .identity-summary-help p { color: #853b27; font-weight: 600; }
#participant-view.workspace-focus .dashboard-hero { display: none; }
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-header {
  position: static;
  height: 68px;
  min-height: 68px;
  background: #0b352f;
  border-bottom: 1px solid rgba(226, 182, 94, .22);
}
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-header .header-action {
  min-height: 44px;
  padding: 11px 18px;
  background: #e2b65e;
  color: #123f38;
  border: 1px solid #d7ad5a;
  border-radius: 6px;
  font: 600 14px/1.5 var(--brand-ui);
  box-shadow: none;
}
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer { padding: 18px 0; color: #e2ceb0; background: #0b352f; border-top: 1px solid rgba(226, 182, 94, .18); }
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer > .shell { width: min(1060px, calc(100% - 48px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer .footer-challenge-brand img { width: 44px; }
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer .footer-challenge-brand small { display: none; }
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer strong { font: 400 12px/1.5 var(--brand-ui); color: #dbd7bd; letter-spacing: 0; }
body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer p { border: 0; margin: 0; padding: 0; }
@media (max-width: 900px) {
  #participant-view:not(.workspace-focus) { width: min(580px, 100%); display: block; min-height: 0; margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; background: #0b352f; overflow: visible; }
  #participant-view:not(.workspace-focus) .dashboard-head { padding: 30px 24px 40px; }
  #participant-view:not(.workspace-focus) .dashboard-hero::after { background: linear-gradient(90deg, rgba(6, 40, 32, .94), rgba(6, 40, 32, .45)), linear-gradient(0deg, #0b352f, transparent 95%); }
  #participant-view:not(.workspace-focus) .dashboard-hero::before { background-position: 65% 52%; }
  #participant-view:not(.workspace-focus) .dashboard-head h1 { font-size: 30px; }
  #participant-view .participant-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
  #participant-view .participant-heading h1 { grid-column: 1; }
  #participant-view .participant-state { grid-column: 2; grid-row: 1 / 3; margin: 0; max-width: 100px; overflow-wrap: anywhere; }
  #participant-view:not(.workspace-focus) #participant-meta { margin-top: 8px; }
  #participant-view:not(.workspace-focus) .identity-summary { padding: 18px 0; }
  #participant-view .participant-actions { margin: 0; }
  #participant-view:not(.workspace-focus) .dashboard-body { position: relative; width: calc(100% - 32px); padding: 7px 18px 6px; margin: -20px auto 0; border: 1px solid #dfd0ac; border-radius: 12px; background: var(--task-paper); }
  #participant-view .task-entry { min-height: 106px; padding: 18px 0; grid-template-columns: 28px minmax(0, 1fr) 20px; gap: 12px; }
  #participant-view .task-entry-copy { gap: 6px; }
  #participant-view .task-entry-copy strong { font-size: 19px; }
  #participant-view .task-entry-number { font-size: 22px; }
  #participant-view .task-entry-primary { min-height: 100px; padding: 20px 12px; }
  #participant-view .task-sequence-item:last-child { padding-top: 8px; }
  #participant-view .identity-summary-help { margin: 6px 0 0; }
  body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-header { height: 60px; min-height: 60px; padding: 6px 20px; }
  body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-header .challenge-brand-mark { width: 56px; }
  body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-header .header-action { padding: 10px 15px; }
  body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer { margin-top: 16px; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); border: 0; }
  body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer > .shell { width: calc(100% - 40px); }
  body:has(#participant-view:not([hidden]):not(.workspace-focus)) .site-footer .footer-challenge-brand img { display: none; }
}
@media (max-width: 360px) {
  #participant-view:not(.workspace-focus) .dashboard-head { padding: 24px 18px 36px; }
  #participant-view:not(.workspace-focus) .dashboard-head h1 { font-size: 26px; }
  #participant-view .participant-actions button { font-size: 13px; padding-inline: 8px; }
  #participant-view:not(.workspace-focus) .dashboard-body { width: calc(100% - 24px); padding-inline: 14px; }
  #participant-view .task-entry { grid-template-columns: 24px minmax(0, 1fr) 18px; gap: 8px; }
  #participant-view .task-entry-copy strong { font-size: 18px; }
  #participant-view .task-entry-hint { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  #participant-view .task-entry, #participant-view .participant-actions button { transition: none; }
}
