/* Isolated preview additions. Existing Ambient tokens/artwork/layout remain authoritative. */
.u-demo-bar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  background: var(--focal);
  color: #fff;
  padding: 8px max(12px, env(safe-area-inset-left));
  font-size: 12px;
}
.u-demo-bar > span {
  flex: 1;
  min-width: 160px;
}
.u-demo-bar .btn {
  min-height: 36px;
  background: #fff;
  color: #202027;
}
.u-demo-bar strong {
  letter-spacing: 0.08em;
  color: var(--lime);
}
.u-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.u-actions > * {
  max-width: 100%;
}
.u-actions .btn {
  min-height: 44px;
}
.u-workspace {
  padding-top: 16px;
}
.u-workspace > .card {
  margin-block: 16px;
}
.u-workspace .section-head {
  margin-top: 8px;
}
.u-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.u-grow {
  flex: 1;
  min-width: min(170px, 100%);
}
.u-row h3 {
  margin: 0;
}
.u-row p {
  margin: 4px 0;
  color: var(--muted);
}
.u-progress {
  height: 7px;
  background: #e6e2e9;
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0;
}
.u-progress > span {
  display: block;
  min-height: 7px;
  border-radius: inherit;
  background: #607824;
  transition: width var(--motion-progress) var(--motion-ease);
}
.u-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  gap: 18px;
  margin-block: 14px;
}
.u-stats > div {
  font-size: 12px;
  color: var(--muted);
}
.u-stats b {
  display: block;
  font-size: 24px;
  line-height: 1.4;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.u-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.u-goal {
  border-top: 1px solid var(--line);
  padding-block: 18px;
}
.u-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.u-check input,
fieldset input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: #607824;
}
.u-badge {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.u-chart-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(40px, 2fr) auto;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.u-chart-row strong {
  font-size: 12px;
}
.u-today {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  align-items: center;
}
.u-art-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #aaa1b3;
  background: #f5eff9;
  border-radius: 18px;
  max-width: 100%;
  color: #4d4656;
}
.u-art-placeholder > span:first-child {
  font-size: 25px;
}
.u-art-placeholder small {
  display: block;
  font-size: 10px;
}
.u-art-review {
  width: 100%;
  height: auto;
  background: #f5eff9;
  border-radius: 20px;
}
.u-demo-label {
  padding: 12px;
  background: #f0eadb;
  color: #4b3b1c;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
#unifiedSheet {
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 100px #1e1e2430;
  background: var(--panel);
  color: var(--text);
  width: min(640px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  max-height: calc(
    100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px
  );
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  position: fixed;
}
#unifiedSheet::backdrop {
  background: #1e1e2470;
  backdrop-filter: blur(5px);
}
.u-sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.u-sheet-head h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.03em;
}
.u-sheet-head button {
  flex: none;
  min-width: 44px;
  min-height: 44px;
}
.u-error {
  color: var(--danger);
}
#unifiedSheet .formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
#unifiedSheet .field {
  min-width: 0;
}
#unifiedSheet .full {
  grid-column: 1/-1;
}
#unifiedSheet label {
  display: block;
}
#unifiedSheet input:not([type="checkbox"]),
#unifiedSheet select,
#unifiedSheet textarea {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid #d8d3d6;
  border-radius: 14px;
  padding: 12px;
  font-size: 16px;
  background: #fff;
  color: #202027;
  min-height: 46px;
}
#unifiedSheet fieldset {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
#unifiedSheet fieldset label {
  min-height: 44px;
}
#unifiedSheet .u-check {
  display: flex;
}
@media (max-width: 540px) {
  .u-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .u-today {
    display: block;
  }
  .u-art-placeholder {
    margin-bottom: 12px;
  }
  .u-demo-bar > span {
    display: none;
  }
  .u-demo-bar .btn {
    font-size: 11px;
    padding: 8px;
  }
  .u-demo-bar .u-actions {
    margin: 0;
  }
  .u-demo-bar {
    gap: 8px;
  }
  .u-demo-bar strong {
    font-size: 10px;
  }
  .u-demo-bar .u-actions {
    flex: 1;
    justify-content: flex-end;
  }
  #unifiedSheet {
    padding: 18px;
  }
  #unifiedSheet .formgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  #unifiedSheet .full {
    grid-column: auto;
  }
  .u-chart-row {
    grid-template-columns: minmax(65px, 1fr) minmax(30px, 1fr) auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .u-progress > span {
    transition: none;
  }
}
/* The demo ribbon participates in the existing standalone safe-area shell. */
html[data-standalone="true"] .u-demo-bar {
  position: fixed;
  top: var(--safe-top);
  left: var(--safe-left);
  right: var(--safe-right);
}
html[data-standalone="true"] #appShell {
  top: calc(
    var(--visual-top, 0px) + var(--safe-top) + var(--demo-bar-height, 60px)
  );
  height: calc(
    var(--visual-height, 100dvh) - var(--safe-top) - var(--safe-bottom) -
      var(--demo-bar-height, 60px)
  );
}
.u-onyx {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
  max-width: 100%;
  min-width: 0;
}
.u-onyx img {
  width: 80px;
  height: 120px;
  object-fit: contain;
  flex: none;
}
.u-onyx div {
  min-width: 0;
}
.u-onyx strong {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.u-onyx p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.u-onyx small {
  color: var(--muted);
}
.u-today .u-onyx {
  flex: 0 0 145px;
  gap: 8px;
}
.u-today .u-onyx img {
  width: 52px;
  height: 78px;
}
.u-today .u-onyx p {
  font-size: 11px;
}
/* Reference refinements: porcelain surfaces and the existing Ambient palette. */
.u-task-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  margin: 8px 0 20px;
}
.u-task-nav button {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  padding: 7px 4px;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  color: #59545f;
  overflow-wrap: anywhere;
}
.u-task-nav [aria-current] {
  background: var(--focal);
  color: #fff;
  font-weight: 700;
}
.u-habit {
  padding: 18px;
  margin: 12px 0;
  border: 1px solid var(--line);
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--habit-accent) 9%, white),
    white 72%
  );
}
.u-habit-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.u-habit-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  min-height: 52px;
}
.u-habit-open > span:last-child {
  min-width: 0;
}
.u-habit-open strong {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.u-habit-open small {
  display: block;
  color: #67616e;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.u-habit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 46px;
  block-size: 46px;
  aspect-ratio: 1;
  flex: none;
  border-radius: 16px;
  background: var(--habit-accent, var(--blue));
  color: var(--habit-ink, #202027);
  font-size: 24px;
}
.u-habit-icon .icon {
  width: 25px;
  height: 25px;
}
.u-habit-check {
  inline-size: 48px;
  block-size: 48px;
  aspect-ratio: 1;
  border-radius: 18px;
  flex: none;
  border: 2px solid #6a6570;
  background: var(--panel);
  color: #48414e;
  display: grid;
  place-items: center;
  padding: 10px;
  transition:
    transform var(--motion-tap),
    background var(--motion-tap);
}
.u-habit-check::before {
  content: "";
  position: absolute;
  pointer-events: none;
}
.u-habit-check .icon {
  width: 24px;
  height: 24px;
}
.u-habit-check.is-complete {
  background: var(--habit-accent);
  color: var(--habit-ink);
  border-color: #66645e;
}
.u-habit-check:disabled {
  opacity: 0.45;
  cursor: default;
}
.u-habit-check:active:not(:disabled) {
  transform: scale(0.94);
}
.u-habit-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #625b68;
  font-size: 11px;
}
.u-habit-foot .btn {
  margin-left: auto;
}
.u-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--habit-accent) 25%, white);
  color: #322f37;
  font-weight: 700;
}
.u-streak .icon {
  width: 15px;
  height: 15px;
}
.u-history {
  min-width: 0;
  margin: 18px 0 12px;
}
.u-dot-scroll {
  overflow: auto;
  max-width: 100%;
  padding: 2px 1px 7px;
  border-radius: 5px;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.u-dot-chart {
  min-width: calc(var(--weeks) * 10px);
}
.u-month-labels {
  display: grid;
  grid-template-columns: repeat(var(--weeks), minmax(0, 1fr));
  height: 17px;
  color: #6c6673;
  font-size: 9px;
  line-height: 1.4;
}
.u-month-labels span {
  overflow: visible;
  white-space: nowrap;
}
.u-dots {
  display: grid;
  grid-template-rows: repeat(7, minmax(0, 1fr));
  grid-auto-flow: column;
  grid-template-columns: repeat(var(--weeks), minmax(0, 1fr));
  gap: 3px;
}
.u-dot {
  display: block;
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 3px;
  background: #e5e1e7;
  border: 1px solid #c6c1cb;
}
.u-dot.complete {
  background: var(--habit-accent);
  border-color: #77736d;
}
.u-dot.partial {
  background: linear-gradient(to top, var(--habit-accent) 50%, #ece8ef 50%);
  border-color: #77736d;
}
.u-dot.missed {
  background: #d8d2de;
  border-color: #797180;
}
.u-dot.rest {
  background: #f7f4f8;
  border-style: dotted;
}
.u-dot.before {
  opacity: 0.3;
}
.u-dot.future {
  background: transparent;
  border-color: #bfb8c6;
}
.u-dot.outside {
  visibility: hidden;
}
.u-calendar-controls {
  display: flex;
  align-items: end;
  gap: 6px;
  margin: 18px 0 10px;
  flex-wrap: wrap;
}
.u-calendar-controls label {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
  color: var(--muted);
}
.u-calendar-controls .btn {
  min-width: 44px;
  min-height: 44px;
  padding: 9px;
}
.u-habit-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 14px 0;
}
.u-habit-calendar > span {
  text-align: center;
  font-size: 10px;
  color: #625b68;
  padding-bottom: 6px;
}
.u-calendar-day {
  min-width: 0;
  min-height: 44px;
  padding: 5px 0;
  border-radius: 13px;
  border: 1px solid transparent;
  background: #f5f1f7;
  color: #51485b;
  font: inherit;
  font-size: 13px;
  display: grid;
  justify-items: center;
  gap: 3px;
}
.u-calendar-day i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a49aaa;
}
.u-calendar-day.complete {
  background: color-mix(in srgb, var(--habit-accent) 28%, white);
  color: #302933;
}
.u-calendar-day.complete i {
  background: #354322;
}
.u-calendar-day.partial {
  border-style: dashed;
  border-color: #7e7489;
}
.u-calendar-day.future {
  background: transparent;
}
.u-calendar-day.before,
.u-calendar-day.rest {
  background: #f7f5f8;
  color: #77707e;
}
.u-calendar-day.outside {
  border-radius: 0;
  background: #faf8fb;
}
.u-calendar-day[aria-pressed="true"] {
  outline: 2px solid #605370;
  outline-offset: 0;
}
.u-calendar-day[aria-current] span {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.u-date-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin: 16px 0;
  background: #fbf9f6;
}
.u-date-note h4 {
  margin: 0;
  font-size: 14px;
}
.u-date-note p {
  font-size: 13px;
}
.u-preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.u-legend {
  font-size: 12px;
  margin-block: 14px;
}
.u-legend summary {
  padding: 10px 0;
  cursor: pointer;
}
.u-month-chart {
  margin: 16px 0;
  min-width: 0;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--line);
}
.u-month-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
}
.u-month-chart > div {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  text-align: center;
  margin-top: 6px;
}
.u-month-chart small {
  font-size: 8px;
  color: #625b68;
}
.u-data-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}
.u-data-table th,
.u-data-table td {
  padding: 8px 5px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.u-data-table caption {
  text-align: left;
  margin: 12px 0;
}
.u-icon-editor {
  display: flex;
  align-items: center;
  gap: 16px;
}
.u-icon-editor fieldset {
  flex: 1;
  min-width: 0;
}
.u-icon-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
#unifiedSheet .u-icon-picker label,
#unifiedSheet .u-colour-picker label {
  position: relative;
  min-height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.u-icon-picker input,
.u-colour-picker input,
.u-segment input {
  position: absolute;
  opacity: 0;
  inline-size: 1px;
  block-size: 1px;
}
.u-icon-picker label > span {
  min-width: 38px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f0ebf7;
}
.u-icon-picker input:checked + span {
  border-color: #5b446f;
}
#unifiedSheet .u-colour-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
}
.u-colour-picker label > span {
  background: var(--swatch);
  width: 100%;
  max-width: 42px;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid #8a8190;
}
.u-colour-picker input:checked + span {
  outline: 3px solid #423747;
  outline-offset: 2px;
}
.u-segment {
  display: flex;
  gap: 5px;
}
#unifiedSheet .u-segment label {
  flex: 1;
  position: relative;
  display: block;
  cursor: pointer;
}
.u-segment label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  font-size: 13px;
}
.u-segment input:checked + span {
  background: var(--focal);
  color: #fff;
}
.u-icon-picker input:focus-visible + span,
.u-colour-picker input:focus-visible + span,
.u-segment input:focus-visible + span {
  outline: 3px solid #5b5bd6;
  outline-offset: 3px;
}
.u-goal-group {
  margin: 16px 0;
}
.u-goal-group > summary {
  min-height: 44px;
  padding-block: 12px;
  cursor: pointer;
  font-size: 13px;
  color: #625b68;
}
.u-goal-list {
  padding: 0;
  overflow: visible;
  margin: 12px 0;
}
.u-goal-list > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 18px;
  border-radius: 27px 27px 0 0;
  background: #eaf1df;
  list-style: none;
}
.u-goal-list > summary::-webkit-details-marker {
  display: none;
}
.u-goal-list > summary > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.u-goal-list strong {
  display: block;
  overflow-wrap: anywhere;
}
.u-goal-list small {
  display: block;
  color: #625b68;
  margin-top: 3px;
}
.u-list-symbol {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  background: #d1dfb5;
  color: #394727;
  display: grid;
  place-items: center;
}
.u-goal-list > .u-progress {
  margin: 0;
  border-radius: 0;
  height: 5px;
}
.u-goal-body {
  padding: 12px 18px 18px;
}
.u-goal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.u-goal-row .u-check {
  flex: 1;
  min-width: 80px;
  font-size: 14px;
}
.u-goal-row .u-check span {
  overflow-wrap: anywhere;
}
.u-row-options {
  display: flex;
  gap: 2px;
  flex: none;
}
.u-row-options .btn {
  width: 44px;
  height: 44px;
  padding: 12px;
}
.u-goal-row > small {
  flex-basis: 100%;
  margin-left: 32px;
}
.u-goal-row.is-done .u-check > span,
.u-goal-row.is-done .u-linked-title,
.u-plan-row.is-done > strong {
  text-decoration: line-through;
  color: #69616f;
}
.u-linked-check {
  width: 24px;
  height: 24px;
  aspect-ratio: 1;
  border: 1.5px solid #716676;
  background: white;
  border-radius: 50%;
  padding: 2px;
  color: white;
  margin: 10px;
  flex: none;
}
.u-linked-check[aria-pressed="true"] {
  background: #526a30;
}
.u-linked-title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.u-inline-add {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  min-width: 0;
}
.u-inline-add input {
  min-width: 0;
  width: 100%;
  flex: 1;
  border: 1px dashed #a59cae;
  border-radius: 14px;
  padding: 12px;
  background: #fcfafc;
  font: inherit;
  font-size: 16px;
}
.u-inline-add button {
  flex: none;
  width: 44px;
  padding: 10px;
}
.u-plan-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.u-task-source {
  padding: 0 12px 8px 44px;
  margin-top: -6px;
}
.u-task-source .btn {
  font-size: 11px;
  padding: 6px;
  min-height: 36px;
}
.u-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.u-quick-grid .btn {
  min-height: 60px;
  text-align: left;
  white-space: normal;
}
.u-habit-today {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.u-undo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  margin-top: 10px;
}
.u-next-goals {
  padding-top: 14px;
}
.u-next-goals h3 {
  font-size: 13px;
}
.u-next-goals p {
  font-size: 12px;
  color: var(--muted);
}
/* Smaller metadata leaves space for Onyx without displacing the XP indicator. */
.xp-card.u-momentum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  padding: 20px;
}
.u-momentum .xp-head {
  grid-column: 1/-1;
  margin: 0;
}
.u-momentum .momentum-body {
  grid-column: 1;
  gap: 10px;
  margin: 8px 0;
}
.u-momentum .xp-center {
  flex: none;
}
.u-momentum .progress-ring {
  width: 76px;
  height: 76px;
}
.u-momentum .xp-number {
  font-size: 21px;
}
.u-momentum .ring-unit {
  font-size: 8px;
}
.u-momentum .momentum-greeting {
  font-size: 13px;
}
.u-momentum .level-pill {
  font-size: 10px;
  padding: 5px 7px;
  flex-wrap: wrap;
  gap: 4px;
}
.u-momentum .xp-caption {
  font-size: 10px;
  margin-top: 7px;
}
.u-momentum .statrow {
  grid-column: 1;
  margin: 0;
  gap: 5px;
  padding: 9px 0;
}
.u-momentum .stat {
  padding: 0;
  gap: 2px;
}
.u-momentum .stat > .icon {
  display: none;
}
.u-momentum .stat b {
  font-size: 15px;
}
.u-momentum .stat > span:last-child {
  font-size: 8px;
  line-height: 1.4;
}
.u-momentum .daily-progress {
  grid-column: 1/-1;
  margin: 0;
  font-size: 11px;
}
#u-momentum-flow {
  display: contents;
}
.u-momentum .u-onyx {
  grid-column: 2;
  grid-row: 2/4;
  margin: 0;
  align-self: center;
}
.u-momentum .u-onyx img {
  width: 74px;
  height: 111px;
  transition: transform 180ms ease;
}
.u-momentum .u-onyx div {
  display: none;
}
.u-momentum .u-onyx:hover img {
  transform: translateY(-3px);
}
.u-momentum-actions {
  grid-column: 1/-1;
  min-width: 0;
}
.u-momentum-actions p {
  margin: 4px 0;
  color: #dad6df;
  font-size: 11px;
}
.u-momentum-actions .u-actions {
  gap: 5px;
  margin: 8px 0 0;
}
.u-momentum-actions .btn {
  min-height: 40px;
  padding: 7px 10px;
  font-size: 11px;
  background: #ffffff0f;
  color: #fff;
  border: 1px solid #a29ba9;
}
.u-momentum-actions .btn:first-child {
  background: var(--lime);
  color: #202027;
  border-color: var(--lime);
}
#todayView .priority {
  padding: 18px;
}
#todayView .priority-title {
  font-size: 21px;
  line-height: 1.35;
  margin: 10px 0;
}
#todayView .priority-meta {
  font-size: 12px;
}
#todayView .priority .formactions {
  margin-top: 12px;
}
.u-finance-summary {
  color: #fff;
  background:
    radial-gradient(ellipse at 80% 20%, #317a7138, transparent 55%),
    radial-gradient(ellipse at 20% 80%, #7a609333, transparent 60%), #1e1e24;
}
.u-finance-summary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.3;
  background:
    radial-gradient(circle at 15% 24%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 70%, #cef063 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 16%, #fff 0 0.6px, transparent 1.2px);
}
.u-finance-summary > div {
  color: #d6d1dc;
}
.u-finance-summary b {
  color: #fff;
  font-size: 24px;
  overflow-wrap: anywhere;
}
.u-finance-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
/* Flat controls: no inherited decorative checkbox shadows or gradients. */
#appShell input[type="checkbox"],
#unifiedSheet input[type="checkbox"] {
  box-shadow: none;
  background-image: none;
  filter: none;
  accent-color: #526a30;
}
#appShell .check {
  box-shadow: none;
  background-image: none;
}
#unifiedSheet button:focus-visible,
.u-task-nav button:focus-visible,
.u-habit-open:focus-visible,
.u-habit-check:focus-visible,
.u-dot-scroll:focus-visible,
.u-goal-list summary:focus-visible {
  outline: 3px solid #5b5bd6;
  outline-offset: 3px;
}
@media (min-width: 768px) {
  .xp-card.u-momentum {
    grid-template-columns: minmax(0, 1fr) 94px;
    padding: 24px;
  }
  .u-momentum .u-onyx img {
    width: 94px;
    height: 141px;
  }
  .u-habit {
    padding: 22px;
  }
}
@media (max-width: 374px) {
  .u-habit {
    padding: 14px;
  }
  .u-habit-icon {
    width: 40px;
    height: 40px;
  }
  .u-habit-open {
    gap: 9px;
  }
  .u-habit-check {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }
  #unifiedSheet {
    padding: 14px;
  }
  .u-habit-calendar {
    gap: 2px;
  }
  .u-calendar-controls {
    gap: 4px;
  }
  .u-calendar-controls label {
    min-width: 110px;
  }
  .u-goal-body {
    padding: 12px;
  }
  .xp-card.u-momentum {
    padding: 16px;
    grid-template-columns: minmax(0, 1fr) 58px;
  }
  .u-momentum .u-onyx img {
    width: 58px;
    height: 87px;
  }
  .u-momentum .momentum-body {
    flex-direction: column;
    align-items: start;
  }
  .u-icon-editor {
    align-items: start;
    gap: 8px;
  }
  #unifiedSheet .u-colour-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .u-habit-check,
  .u-momentum .u-onyx img {
    transition: none;
  }
  .u-momentum .u-onyx:hover img {
    transform: none;
  }
}
/* Keep the actual habit list near the top instead of repeating a large hero. */
#habitsView .workspace-header {
  margin: 14px 0 18px;
}
#habitsView .workspace-header h2 {
  font-size: 28px;
  margin: 10px 0;
}
#habitsView .workspace-header .sub {
  font-size: 13px;
  line-height: 1.5;
}
#habitsView > .workspace-summary {
  padding: 16px;
  margin-bottom: 16px;
}
#habitsView .workspace-summary .progress-ring {
  width: 64px;
  height: 64px;
}
#habitsView .workspace-summary .xp-number {
  font-size: 22px;
}
#habitsView .workspace-summary .ring-unit {
  font-size: 8px;
}
#habitsView .workspace-summary .summary-layout {
  gap: 14px;
}
#habitsView .workspace-summary h3 {
  font-size: 16px;
  margin: 5px 0;
}
#habitsView .workspace-summary .eyebrow {
  font-size: 9px;
}
#habitsView .workspace-summary .sub {
  font-size: 11px;
  margin: 4px 0;
}
#habitsView .workspace-summary .summary-foot {
  margin-top: 10px;
  padding-top: 10px;
  font-size: 10px;
}
#unifiedSheet .u-icon-editor {
  flex-direction: row;
}
#unifiedSheet .field > summary {
  min-height: 36px;
  cursor: pointer;
  font-size: 12px;
  color: #625b68;
}
#unifiedSheet .u-icon-editor > .u-habit-icon {
  width: 60px;
  height: 60px;
  border-radius: 21px;
}
.u-goal-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid #797180;
  border-radius: 50%;
  background: #fff;
  padding: 0;
}
.u-goal-row input[type="checkbox"]:checked {
  background: #526a30;
  border-color: #526a30;
}
.u-goal-row input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
}

@media (max-width: 540px) {
  #unifiedSheet .u-colour-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

#unifiedSheet .u-segment {
  flex-direction: row;
}
/* Dark chart surface keeps lime/cyan data strokes readable like reference 5. */
.u-month-chart {
  background: var(--focal);
  border-radius: 18px;
  padding: 14px 12px 12px;
}
.u-month-chart small {
  color: #d6d1dc;
}

/* Keep contribution dots small on desktop instead of stretching them into tiles. */
.u-dot-chart {
  width: calc(var(--weeks) * 12px);
  max-width: 100%;
}
@media (min-width: 768px) {
  .u-habit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
    column-gap: 24px;
  }
  .u-habit > .u-habit-heading {
    grid-column: 1;
    grid-row: 1;
  }
  .u-habit > .u-history {
    grid-column: 2;
    grid-row: 1/3;
    align-self: center;
    margin: 0;
  }
  .u-habit > .u-habit-foot {
    grid-column: 1;
    grid-row: 2;
  }
}
/* Today v2: a single concise overview; the existing controls retain their IDs. */
#todayView > .hero {
  display: block;
}
.xp-card.u-momentum.u-momentum-v2 {
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 8px;
  padding: 18px;
}
.u-momentum-v2 .xp-head {
  grid-column: 1/-1;
  grid-row: 1;
}
.u-momentum-v2 .momentum-body {
  grid-column: 1;
  grid-row: 2;
  flex-direction: row;
  align-items: center;
  margin: 4px 0;
  gap: 10px;
}
.u-momentum-v2 .progress-ring {
  width: 64px;
  height: 64px;
}
.u-momentum-v2 .momentum-greeting {
  font-size: 11px;
  line-height: 1.4;
  margin: 0 0 5px;
}
.u-momentum-v2 .level-pill {
  font-size: 13px;
  line-height: 1.4;
}
.u-momentum-v2 .level-pill #levelName {
  display: none;
}
.u-momentum-v2 .xp-caption {
  font-size: 9px;
}
.u-momentum-v2 .statrow {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 2px 0;
}
.u-momentum-v2 .stat {
  border: 0;
  background: #ffffff0b;
  padding: 8px;
  border-radius: 14px;
}
.u-momentum-v2 .stat b {
  font-size: 23px;
  line-height: 1.2;
}
.u-momentum-v2 .stat > span:last-child {
  font-size: 10px;
}
.u-momentum-v2 #u-momentum-flow {
  display: block;
  grid-column: 2;
  grid-row: 2/4;
  align-self: center;
}
.u-momentum-v2 .u-tier-onyx {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.u-momentum-v2 .u-tier-onyx img {
  width: 90px;
  height: 124px;
  object-fit: contain;
}
.u-momentum-v2 .u-tier-onyx small {
  color: #ddd6e3;
  font-size: 10px;
}
.u-momentum-v2 .daily-progress {
  display: none;
}
#todayView .u-momentum-v2 .priority {
  grid-column: 1/-1;
  grid-row: 4;
  box-shadow: none;
  background: transparent;
  border: 0;
  border-top: 1px solid #ffffff24;
  border-radius: 0;
  padding: 12px 0 0;
  margin: 4px 0 0;
  min-width: 0;
}
.u-momentum-v2 .priority h3 {
  color: #d6cfdf;
  font-size: 10px;
}
.u-momentum-v2 .primary-chip {
  display: none;
}
#todayView .u-momentum-v2 .priority-title {
  font-size: 17px;
  line-height: 1.4;
  color: white;
  margin: 7px 0 4px;
}
#todayView .u-momentum-v2 .priority-meta {
  font-size: 11px;
  color: #d6cfdf;
}
#todayView .u-momentum-v2 .priority .formactions {
  gap: 7px;
  margin: 10px 0;
}
.u-momentum-v2 .priority .btn {
  min-height: 44px;
  padding: 8px 13px;
  font-size: 11px;
}
.u-momentum-v2 .priority .btn.secondary {
  background: #ffffff0c;
  color: white;
  border: 1px solid #aaa0b6;
}
.u-momentum-v2 .priority-shift {
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid #ffffff24;
}
.u-momentum-v2 .priority-shift > h3 {
  display: none;
}
.u-next-shift {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  background: transparent;
  border: 0;
  color: #e7e2eb;
  padding: 0;
  font: inherit;
  font-size: 11px;
  text-align: left;
}
.u-next-shift .icon {
  width: 16px;
  height: 16px;
}
#u-saving-spotlight {
  grid-column: 1/-1;
  grid-row: 5;
}
.u-spotlight {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #ffffff30;
  background: #ffffff0a;
  color: white;
  border-radius: 15px;
  padding: 9px 12px;
  font: inherit;
  font-size: 11px;
}
.u-spotlight span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}
.u-spotlight .icon {
  width: 17px;
  flex: none;
}
.u-today-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 20px;
}
.u-today-shortcuts .btn {
  flex: 1 1 90px;
  min-height: 44px;
  font-size: 11px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: #fff;
}
#todayView .u-today-habits {
  grid-column: 1/-1;
}
.u-five-day {
  min-width: 0;
}
.u-five-head,
.u-five-row {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) repeat(5, minmax(0, 36px));
  gap: 4px;
  align-items: center;
}
.u-five-head {
  padding-bottom: 10px;
  color: #6b6174;
  font-size: 9px;
}
.u-five-head > span:not(:first-child) {
  text-align: center;
}
.u-five-head b {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.u-five-row {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.u-five-name {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 44px;
  min-width: 0;
  text-align: left;
  color: var(--text);
  font: inherit;
  font-size: 11px;
}
.u-five-name strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
.u-five-name .u-habit-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
}
.u-five-name .icon {
  width: 17px;
  height: 17px;
}
.u-day-check {
  height: 44px;
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 11px;
  border: 1px solid #8a8091;
  color: #62536e;
  background: #f1edf5;
}
.u-day-check .icon {
  width: 19px;
  height: 19px;
}
.u-day-check.complete {
  background: var(--habit-accent);
  color: var(--habit-ink);
  border-color: #716478;
}
.u-day-check.partial {
  background: linear-gradient(
    to top,
    var(--habit-accent) var(--day-fill),
    #f4eef8 var(--day-fill)
  );
  color: #202027;
}
.u-day-check:disabled {
  opacity: 0.35;
  border-style: dotted;
}
.u-day-check:focus-visible {
  outline: 3px solid #5b5bd6;
  outline-offset: 2px;
}
.u-capture-row {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 14px;
}
.u-unified-streaks .streak-metric > span {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  background: #e9efd9;
  border-radius: 22px;
  color: #3e4930;
  padding: 8px 12px;
  font-size: 11px;
  min-height: 36px;
}
.u-unified-streaks .streak-metric > span .icon {
  width: 15px;
  height: 15px;
}
.u-unified-streaks .streak-metric meter {
  display: none;
}
.u-goal-list.is-complete > summary strong {
  text-decoration: line-through;
  color: #6a626e;
}
.u-finance-spotlight {
  grid-column: 1/-1;
  border-top: 1px solid #ffffff25;
  padding-top: 12px;
}
.u-finance-spotlight > span {
  float: right;
}
.u-finance-spotlight .u-progress {
  background: #ffffff30;
}
.u-finance-spotlight .u-progress > span {
  background: var(--lime);
}
.u-ledger-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.u-ledger-row small,
.u-finance-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}
.u-more-menu {
  position: relative;
  flex: none;
}
.u-more-menu > summary {
  display: grid;
  place-items: center;
  list-style: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  background: #f2eef5;
}
.u-more-menu > summary::-webkit-details-marker {
  display: none;
}
.u-more-menu > div {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 12;
  width: 205px;
  max-width: calc(100vw - 60px);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 30px #29213120;
}
.u-more-menu[open] {
  z-index: 12;
}
.u-more-menu > div .btn {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  min-height: 44px;
  margin: 3px 0;
}
.u-contributions {
  margin-top: 12px;
}
.u-contributions > summary {
  min-height: 44px;
  cursor: pointer;
  padding: 10px 0;
  font-size: 12px;
}
.u-meal-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.u-meal-row > span {
  font-size: 11px;
  color: var(--muted);
}
.u-meal-row strong {
  overflow-wrap: anywhere;
}
.u-meal-row .btn {
  font-size: 10px;
  min-height: 44px;
  padding: 7px;
}
.u-week-day {
  padding: 20px;
  margin-block: 14px;
}
.u-week-day h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
.u-week-day .u-workout-row p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--muted);
}
.u-planner-edit-day {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.u-routine-reminders {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.u-routine-reminders > summary {
  min-height: 36px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
#unifiedSheet .u-week-chips {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0;
}
#unifiedSheet .u-week-chips label {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 44px;
}
#unifiedSheet .u-week-chips input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.u-week-chips label > span {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 0;
  font-size: 10px;
  border: 1px solid #a59ab0;
  border-radius: 11px;
  background: #f9f6fc;
  color: #55485d;
}
.u-week-chips input:checked + span {
  background: #e5d9f5;
  border-color: #766087;
  color: #3a2847;
  font-weight: 700;
}
.u-week-chips input:focus-visible + span {
  outline: 3px solid #5b5bd6;
  outline-offset: 2px;
}
#unifiedSheet input[type="time"],
#unifiedSheet input[type="date"],
#unifiedSheet input[type="month"] {
  border-radius: 20px;
  background: #f8f5fa;
  min-height: 44px;
}
.u-section-onyx .u-onyx {
  margin: 10px 0 0;
  gap: 10px;
}
.u-section-onyx .u-onyx img {
  width: 100px;
  height: 100px;
}
.u-section-onyx .u-onyx div {
  display: block;
}
.u-section-onyx .u-onyx p,
.u-section-onyx .u-onyx small {
  color: inherit;
  font-size: 11px;
}
.u-section-onyx .u-onyx strong {
  display: none;
}
.u-shift-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 28px;
}
.u-shift-overview #wageMonthTitle {
  grid-column: 1;
}
.u-shift-overview #wageDashboard {
  grid-column: 1;
}
.u-shift-overview #u-shift-today {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
}
.u-shift-overview #u-shift-today h3 {
  font-size: 13px;
  color: #ddd6e4;
  margin: 0 0 8px;
}
.u-shift-overview #u-shift-today p {
  font-size: 12px;
  color: #e9e1ef;
}
.u-shift-overview .wage-notice {
  grid-column: 1/-1;
}
@media (max-width: 540px) {
  .u-shift-overview {
    grid-template-columns: minmax(0, 1fr);
  }
  .u-shift-overview #u-shift-today {
    grid-column: 1;
    grid-row: auto;
    border-top: 1px solid #ffffff30;
    padding-top: 12px;
    margin-top: 12px;
  }
  .u-planner-edit-day {
    grid-template-columns: minmax(0, 1fr);
  }
  .u-meal-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 7px;
  }
  .u-meal-row .btn {
    grid-column: 2;
    justify-self: start;
  }
}
@media (max-width: 374px) {
  .xp-card.u-momentum.u-momentum-v2 {
    padding: 16px;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 8px;
  }
  .u-momentum-v2 .u-tier-onyx img {
    width: 72px;
    height: 110px;
  }
  .u-momentum-v2 .momentum-body {
    gap: 7px;
  }
  .u-momentum-v2 .progress-ring {
    width: 54px;
    height: 54px;
  }
  .u-momentum-v2 .momentum-greeting {
    font-size: 10px;
  }
  .u-momentum-v2 .stat {
    padding: 7px;
  }
  .u-momentum-v2 .stat b {
    font-size: 21px;
  }
  .u-momentum-v2 .stat > span:last-child {
    font-size: 9px;
  }
  .u-five-head,
  .u-five-row {
    grid-template-columns: minmax(64px, 1fr) repeat(5, minmax(0, 30px));
    gap: 3px;
  }
  .u-five-name {
    gap: 4px;
    font-size: 10px;
  }
  .u-five-name .u-habit-icon {
    width: 22px;
    height: 22px;
  }
}

/* Navigation / daily-flow follow-up: scoped components, no root overflow masking. */
.u-context-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.u-context-pair .u-next-shift {
  min-width: 0;
  min-height: 44px;
  font-size: 11px;
  text-align: left;
  line-height: 1.5;
}
.u-context-pair .icon {
  flex: 0 0 18px;
}
.u-context-pair span {
  overflow-wrap: anywhere;
}
.u-day-amount {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.u-today-shortcuts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.u-onyx-context {
  margin: 10px 0;
  gap: 14px;
  align-items: center;
}
.u-onyx-context img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  flex: 0 0 auto;
}
.u-onyx-context p {
  margin: 4px 0;
  line-height: 1.55;
}
.u-onyx-context div {
  min-width: 0;
}
.u-planner-focal {
  padding: 20px;
}
.u-planner-focal h3 {
  font-size: 20px;
  margin: 8px 0;
}
.u-planner-focal .u-onyx {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}
.u-planner-focal .u-onyx p {
  color: #e7e0ed;
}
#fitnessView .u-actions,
#trackerView .u-actions {
  gap: 8px;
}
.u-upcoming-list > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 800;
  cursor: pointer;
}
.u-upcoming-list > summary > span:last-child {
  margin-left: auto;
}
.u-upcoming-row {
  padding: 10px 0;
  min-height: 56px;
}
.u-upcoming-row .u-linked-title small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #6b6174;
  margin-top: 4px;
}
.u-upcoming-row .btn {
  flex: 0 0 44px;
  min-width: 44px;
  padding: 8px;
}
.u-calendar-dot {
  display: block;
  line-height: 10px;
  font-size: 18px;
  color: currentColor;
}
.u-quick-grid .btn {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  min-height: 52px;
  padding: 12px;
}
.u-quick-grid .icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}
#unifiedSheet fieldset:has([name="taskIds"]),
#unifiedSheet fieldset:has([name="habitIds"]) {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* Remove native WebKit bevel/inner square while retaining every checkbox state. */
#unifiedSheet .u-check input[type="checkbox"],
#unifiedSheet fieldset input[type="checkbox"]:not(.u-week-chips input),
.u-goal-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box !important;
  padding: 0 !important;
  inline-size: 24px !important;
  block-size: 24px !important;
  min-inline-size: 24px !important;
  min-block-size: 24px !important;
  flex: 0 0 24px !important;
  aspect-ratio: 1;
  border: 2px solid #81758c !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
  display: inline-block;
  vertical-align: middle;
}
#unifiedSheet .u-check input[type="checkbox"]:checked,
#unifiedSheet fieldset input[type="checkbox"]:checked:not(.u-week-chips input),
.u-goal-row input[type="checkbox"]:checked {
  background: #5b477c
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/20px no-repeat !important;
  border-color: #5b477c !important;
}
#unifiedSheet input[type="checkbox"]:indeterminate {
  background: #5b477c !important;
}
#unifiedSheet input[type="checkbox"]:indeterminate::after {
  content: "−";
  color: white;
  display: block;
  text-align: center;
}
#unifiedSheet input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#unifiedSheet input[type="checkbox"]:focus-visible {
  outline: 3px solid #6551a4;
  outline-offset: 3px;
}
.u-goal-row input[type="checkbox"]:checked::after {
  content: none;
}
.top-actions {
  gap: 6px;
  flex: 0 0 auto;
}
.top-actions > button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  aspect-ratio: 1;
  padding: 10px;
}
#unifiedSheet input:not([type="checkbox"]),
#unifiedSheet select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.u-workspace .card,
.u-workspace .u-row,
.u-workspace .u-grow {
  min-width: 0;
}
.u-workspace h2,
.u-workspace h3,
.u-workspace strong {
  overflow-wrap: anywhere;
}
#personalAnalyticsView .u-finance-summary .u-section-onyx {
  grid-column: 1/-1;
}
@media (max-width: 430px) {
  .topbar {
    gap: 5px;
  }
  .top-actions {
    gap: 3px;
  }
  .top-actions > button {
    width: 40px;
    height: 44px;
    min-width: 40px;
    padding: 8px;
  }
  .brand {
    min-width: 0;
    gap: 6px;
  }
  .brand-name {
    font-size: 14px;
  }
  .brand-subtitle,
  #brandSectionLabel {
    font-size: 10px;
  }
  .u-section-onyx .u-onyx img {
    width: 86px;
    height: 86px;
  }
  .u-onyx-context img {
    width: 96px;
    height: 96px;
  }
  .u-momentum-v2 .priority .formactions {
    display: flex;
    flex-wrap: wrap;
  }
  .u-momentum-v2 .priority .formactions .btn {
    padding: 8px 10px;
    min-height: 44px;
    font-size: 11px;
  }
}
@media (max-width: 350px) {
  .brand-text {
    max-width: 96px;
  }
  .top-actions > button {
    width: 36px;
    min-width: 36px;
  }
  .u-context-pair {
    gap: 8px;
  }
  .u-momentum-v2 .priority .formactions .btn {
    padding: 8px 7px;
    font-size: 10px;
  }
}

#streakCaption {
  display: none !important;
}
.top-actions > .profile-trigger {
  padding: 0;
  flex: 0 0 44px;
  inline-size: 44px;
  block-size: 44px;
}
.top-actions .profile-trigger #headerProfileAvatar {
  width: 100%;
  height: 100%;
  inline-size: 100%;
  block-size: 100%;
  aspect-ratio: 1;
}
.top-actions .profile-trigger #headerProfileAvatar img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
@media (max-width: 350px) {
  .top-actions > .profile-trigger {
    flex-basis: 36px;
    inline-size: 36px;
    block-size: 36px;
    height: 36px;
  }
}

/* Put a readable portrait alongside the overview rather than a separate tall row. */
#planView .workspace-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  column-gap: 12px;
  padding: 20px;
}
#planView .workspace-summary > :not(.u-section-onyx):not(.summary-foot) {
  grid-column: 1;
}
#planView .workspace-summary > .u-section-onyx {
  grid-column: 2;
  grid-row: 1/5;
  align-self: center;
}
#planView .workspace-summary .u-onyx {
  flex-direction: column;
  gap: 8px;
  text-align: center;
  margin: 0;
}
#planView .workspace-summary .u-onyx p {
  font-size: 10px;
  line-height: 1.5;
}
#planView .workspace-summary .summary-foot {
  grid-column: 1/-1;
  margin-top: 14px;
}
#planView .workspace-summary h3 {
  font-size: 18px;
  line-height: 1.4;
  margin: 8px 0;
}
#planView .workspace-summary .sub {
  font-size: 12px;
  margin: 0;
}
#planView .workspace-summary .summary-numbers {
  gap: 16px;
  margin-top: 12px;
}
#planView .workspace-summary .summary-numbers b {
  font-size: 24px;
}
#planView .workspace-summary .summary-numbers span {
  font-size: 11px;
}
