/* The workpaper profile uses two facing pages; data and controls remain shared. */
html[data-theme="purple"] {
  --profile-accent: var(--theme-accent);
  --profile-accent-deep: var(--theme-accent-hover);
  --profile-accent-soft: var(--theme-soft);
  --profile-page: var(--theme-paper);
  --profile-heat-1: #eee5ff;
  --profile-heat-2: #d4baff;
  --profile-heat-3: #ab78fa;
  --profile-heat-4: #5700f5;
}

html[data-theme="purple"] .profile-page {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  gap: 0;
  width: min(calc(100% - 32px), 1520px);
  min-height: calc(100dvh - 108px);
  margin: 18px auto 24px;
  padding: 0;
  border: 1px solid var(--theme-soft);
  border-radius: 14px;
  background:
    radial-gradient(circle, #b797ef65 1px, transparent 1.5px) 14px 14px / 7px 7px no-repeat,
    linear-gradient(90deg, #fff 0%, #fff calc(44% - 10px), var(--theme-soft) calc(44% - 3px), var(--theme-soft) 44%, var(--theme-paper) calc(44% + 3px), #fff calc(44% + 12px));
  box-shadow: 0 5px 20px #3c117812;
  color: var(--theme-ink);
  overflow: hidden;
}

html[data-theme="purple"] .profile-page .profile-sidebar,
html[data-theme="purple"] .profile-page .profile-panel {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="purple"] .profile-page .profile-sidebar {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  padding: 64px 34px 0;
}

html[data-theme="purple"] .profile-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 12px;
  width: 26px;
  height: 42px;
  background: var(--profile-accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}

html[data-theme="purple"] .profile-page .profile-identity {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px 20px;
}
html[data-theme="purple"] .profile-page .profile-avatar {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 112px;
  height: 112px;
  border: 0;
}
html[data-theme="purple"] .profile-page .profile-identity-copy {grid-column: 2; grid-row: 1}
html[data-theme="purple"] .profile-page .profile-identity h1 {font-size: clamp(1.5rem, 2.1vw, 2rem); font-weight: 600; color: var(--theme-ink)}
html[data-theme="purple"] .profile-page .profile-username {display: inline; font: 14px/1.6 Arial, sans-serif; color: var(--theme-muted)}
html[data-theme="purple"] .profile-page .profile-joined {font-size: 13px; color: var(--theme-muted); margin: 4px 0 0; white-space: normal}
html[data-theme="purple"] .profile-page .profile-bio {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  margin: 0;
  color: var(--theme-ink);
  font-size: 14px;
}
html[data-theme="purple"] .profile-page .profile-edit-button {
  grid-column: 2;
  grid-row: 3;
  justify-self: start;
  width: auto;
  min-height: 36px;
  padding: 6px 12px;
  color: var(--profile-accent);
  font-size: 14px;
}
html[data-theme="purple"] .profile-page .profile-edit-button::before {
  inset: 0;
  border-color: var(--profile-accent);
  border-radius: 5px;
  transform: none;
  background: transparent;
}

html[data-theme="purple"] .profile-page .profile-stats {
  margin: 34px 0 0;
  padding: 24px 0;
  border-block: 1px solid var(--theme-rule);
}
html[data-theme="purple"] .profile-stats > h2,
html[data-theme="purple"] .profile-stat-icon,
html[data-theme="purple"] .profile-achievements {display: none}
html[data-theme="purple"] .profile-page .profile-stat-list {grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0}
html[data-theme="purple"] .profile-page .profile-stat {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  padding: 0 10px;
  border-right: 1px solid var(--theme-rule);
}
html[data-theme="purple"] .profile-page .profile-stat:last-child {border: 0}
html[data-theme="purple"] .profile-page .profile-stat-label {grid-column: 1 / -1; font-size: 13px; font-weight: 650; color: var(--theme-ink); text-align: center}
html[data-theme="purple"] .profile-page .profile-stat strong {font-size: clamp(32px, 3.6vw, 52px); line-height: 1.15; color: var(--profile-accent)}
html[data-theme="purple"] .profile-page .profile-stat-unit {font-size: 14px; color: var(--theme-ink)}

html[data-theme="purple"] .profile-page .profile-calendar-panel {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin: 0;
  padding: 30px 34px 72px;
}
html[data-theme="purple"] .profile-page .profile-section-title {font-size: 22px; color: var(--theme-ink); letter-spacing: normal}
html[data-theme="purple"] .profile-page .profile-section-title::before {
  flex-basis: 12px;
  width: 12px;
  height: 24px;
  background: var(--profile-accent);
  transform: skewX(-18deg);
}
html[data-theme="purple"] .profile-page .profile-calendar-inner {min-width: 0}
html[data-theme="purple"] .profile-page .profile-calendar-months {gap: 3px; font-size: 10px; margin-left: 32px}
html[data-theme="purple"] .profile-page .profile-calendar-months span {white-space: nowrap}
html[data-theme="purple"] .profile-page .profile-calendar-layout {grid-template-columns: 28px minmax(0, 1fr); gap: 4px}
html[data-theme="purple"] .profile-page .profile-calendar-weeks {gap: 3px}
html[data-theme="purple"] .profile-page .profile-calendar-week,
html[data-theme="purple"] .profile-page .profile-weekdays {grid-template-rows: repeat(7, 18px); gap: 4px}
html[data-theme="purple"] .profile-page .profile-calendar-day {border-radius: 0; background: var(--theme-soft)}
html[data-theme="purple"] .profile-page .profile-calendar-day.future {background: transparent}
html[data-theme="purple"] .profile-page .profile-calendar-day[data-level="1"] {background: var(--profile-heat-1)}
html[data-theme="purple"] .profile-page .profile-calendar-day[data-level="2"] {background: var(--profile-heat-2)}
html[data-theme="purple"] .profile-page .profile-calendar-day[data-level="3"] {background: var(--profile-heat-3)}
html[data-theme="purple"] .profile-page .profile-calendar-day[data-level="4"] {background: var(--profile-heat-4)}
html[data-theme="purple"] .profile-page .profile-calendar-legend {font-size: 10px; gap: 5px; margin-top: 14px}
html[data-theme="purple"] .profile-page .profile-calendar-legend i {width: 12px; height: 12px; border-radius: 0}

html[data-theme="purple"] .profile-page .profile-records-panel {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 680px;
  margin: 0;
  padding: 64px 32px 72px;
}
html[data-theme="purple"] .profile-page .profile-records-header {align-items: baseline}
html[data-theme="purple"] .profile-page .profile-records-panel .profile-section-title {font-size: 28px}
html[data-theme="purple"] .profile-page .profile-filter-tab {clip-path: none; border-radius: 5px; font-size: 13px; padding: 6px 10px; min-width: 0}
html[data-theme="purple"] .profile-page .profile-filter-tabs {gap: 5px; flex-wrap: wrap}
html[data-theme="purple"] .profile-page .profile-search {border-color: var(--theme-rule); border-radius: 5px}
html[data-theme="purple"] .profile-page .profile-date-range input {width: 128px; border-color: var(--theme-rule); font-size: 13px}
html[data-theme="purple"] .profile-page .profile-records-table th {font-size: 12px; color: var(--theme-muted); padding-inline: 4px}
html[data-theme="purple"] .profile-page .profile-records-table td {padding: 20px 4px; border-color: var(--theme-soft)}
html[data-theme="purple"] .profile-page .profile-records-table th:nth-child(1) {width: 21%}
html[data-theme="purple"] .profile-page .profile-records-table th:nth-child(2) {width: 29%}
html[data-theme="purple"] .profile-page .profile-records-table th:nth-child(3) {width: 24%}
html[data-theme="purple"] .profile-page .profile-records-table th:nth-child(4) {width: 26%}
html[data-theme="purple"] .profile-page .profile-record-time {white-space: normal; overflow-wrap: anywhere; font: 12px/1.6 Arial, sans-serif; color: var(--theme-muted)}
html[data-theme="purple"] .profile-page .profile-record-title {font-size: 15px; line-height: 1.5; color: var(--theme-ink)}
html[data-theme="purple"] .profile-page .profile-record-status {font-size: 12px; gap: 4px}
html[data-theme="purple"] .profile-page .profile-score {font-size: 11px; padding-left: 0}
html[data-theme="purple"] .profile-page .profile-record-action {font-size: 13px; color: var(--profile-accent); padding: 6px 2px; border: 0; gap: 4px; white-space: nowrap}
html[data-theme="purple"] .profile-page .profile-record-action::before {display: none}
html[data-theme="purple"] .profile-page .profile-records-table tbody tr:hover {background: var(--theme-paper)}

html[data-theme="purple"] .profile-calendar-panel::after,
html[data-theme="purple"] .profile-records-panel::after {
  content: "01";
  position: absolute;
  bottom: 22px;
  left: 34px;
  right: 34px;
  padding-top: 8px;
  border-top: 1px solid var(--theme-rule);
  color: var(--theme-muted);
  font: italic 14px/1.4 Georgia, serif;
}
html[data-theme="purple"] .profile-records-panel::after {content: "02"; text-align: right}

@media (max-width: 980px) {
  html[data-theme="purple"] .profile-page {grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; background: #fff; width: min(calc(100% - 24px), 720px); margin-top: 12px}
  html[data-theme="purple"] .profile-page .profile-sidebar {grid-column: 1; grid-row: 1; padding: 40px 24px 0}
  html[data-theme="purple"] .profile-page .profile-calendar-panel {grid-column: 1; grid-row: 2; padding: 26px 24px 30px}
  html[data-theme="purple"] .profile-page .profile-records-panel {grid-column: 1; grid-row: 3; min-height: 0; padding: 28px 24px 40px; border-top: 1px solid var(--theme-rule)}
  html[data-theme="purple"] .profile-calendar-panel::after,
  html[data-theme="purple"] .profile-records-panel::after {display: none}
  html[data-theme="purple"] .profile-sidebar::before {right: 24px; height: 28px; width: 20px}
}
@media (max-width: 600px) {
  html[data-theme="purple"] .profile-page .profile-sidebar {padding: 40px 18px 0}
  html[data-theme="purple"] .profile-page .profile-identity {grid-template-columns: 80px minmax(0, 1fr); gap: 8px 14px}
  html[data-theme="purple"] .profile-page .profile-avatar {width: 80px; height: 80px; grid-row: 1 / span 2}
  html[data-theme="purple"] .profile-page .profile-identity h1 {font-size: 28px}
  html[data-theme="purple"] .profile-page .profile-bio {grid-column: 1 / -1; grid-row: 3; margin-top: 8px}
  html[data-theme="purple"] .profile-page .profile-edit-button {grid-column: 2; grid-row: 2; font-size: 12px; padding: 5px 10px; min-height: 32px}
  html[data-theme="purple"] .profile-page .profile-stats {margin-top: 24px; padding-block: 18px}
  html[data-theme="purple"] .profile-page .profile-stat {padding-inline: 5px; gap: 4px}
  html[data-theme="purple"] .profile-page .profile-stat strong {font-size: 36px}
  html[data-theme="purple"] .profile-page .profile-stat-label {font-size: 12px}
  html[data-theme="purple"] .profile-page .profile-calendar-panel {padding: 24px 18px}
  html[data-theme="purple"] .profile-page .profile-records-panel {padding: 24px 18px 30px}
  html[data-theme="purple"] .profile-page .profile-records-panel .profile-section-title {font-size: 24px}
  html[data-theme="purple"] .profile-page .profile-records-table td {padding: 5px 0}
}

@media(max-width:760px){html[data-theme="purple"] .profile-page .profile-records-table td{padding:5px 0}}
