/* Project management shares the diary's type, spacing and action language. */
body:is([data-page="projects"],[data-page="project"]):where(:not(:has(.first-visit-welcome))) .page-header {padding:24px var(--page-gutter) 0;align-items:center;}
body:is([data-page="projects"],[data-page="project"]):where(:not(:has(.first-visit-welcome))) #app {padding:24px var(--page-gutter) 32px;}
body:is([data-page="projects"],[data-page="project"]) .breadcrumbs {margin-bottom:6px;}
/* Project work screens use the outer workspace gutter. Only the directory has a project rail. */
body:has(.project-editor-page) :is(.page-header,#app) {
  padding-inline:var(--work-inset-inline);
  container:project-frame / inline-size;
}
@container project-frame (width > 880px) {
  /* The standalone editor follows the notebook with the project list folded. */
  body:has(.project-editor-page) .page-header > div:first-child,
  .project-editor-page {
    margin-inline-start:var(--work-content-offset);
  }
  .project-dialog-mount > form.project-review {
    grid-template-columns:minmax(0,1fr) max-content;
    grid-template-areas:"sections actions";
    grid-template-rows:auto;
  }
  .project-review__actions {position:sticky;}
}
body:has(.project-editor-page) .page-header {
  align-items:start;padding-block:var(--work-inset-top) 0;
}
body:has(.project-editor-page) #app {
  display:flex;max-width:none;padding-block:24px var(--work-inset-bottom);
}
.project-editor-page,.project-editor-page > .project-dialog-mount {
  display:flex;flex-direction:column;min-width:0;flex:1;
}

/* Projects occupies the same three workspace tracks as Tagebuch. Only the middle track divides. */
body[data-page="projects"]:has(.project-sheet-workspace) .page-header {display:none;}
body[data-page="projects"]:has(.project-sheet-workspace) #app {
  margin:0;padding-block:var(--work-inset-top) var(--work-inset-bottom);
  padding-inline:var(--work-inset-inline);container:diary-page / inline-size;
}
.project-sheet-workspace {
  --sheet-body-height: max(340px, calc(var(--notebook-height) - var(--work-action-size) - var(--work-action-lift) - var(--work-column-gap)));
  min-height:var(--notebook-height);
  padding-block-end:var(--work-action-lift);
  font:400 var(--text-body)/1.45 var(--work-body-font);
}
.project-sheet-workspace :is(.sheet-facts dt, .sheet-totals dt, .sheet-section h3, .sheet-entry-meta, .sheet-hour-columns) {
  font-family:var(--ui-font);
}
.project-sheet-workspace>.project-drawer {max-height:var(--sheet-body-height);}
.sheet-content {--line:#dedfda;--title-rule:var(--work-title-rule);container:project-content / inline-size;min-width:0;max-height:var(--sheet-body-height);overflow:auto;scrollbar-width:thin;}
.sheet-title {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 20px;padding-bottom:12px;border-bottom:1px solid var(--title-rule);}
.sheet-project-sleep {font-size:.45em;white-space:nowrap;}
@container diary-page (min-width:881px) {
  .project-sheet-workspace[data-projects-open="true"] .sheet-title {
    min-height:calc(var(--drawer-heading-height) + var(--drawer-heading-gap) + var(--drawer-search-height));
    padding-bottom:0;
  }
}
.sheet-title h1,.workspace-title,body:is(:has(.project-editor-page),[data-page="invoice-new"]) .page-header h1 {
  margin:0;font:550 var(--work-title-size)/1.3 var(--ui-font);letter-spacing:-.6px;overflow-wrap:anywhere;
}
.sheet-columns {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--work-column-gap);align-items:start;}
.sheet-editor-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 16px;}
.sheet-section h2 {font:550 var(--text-body)/1.3 var(--ui-font);margin:0;}
.sheet-editor h2 {font:550 var(--work-dialog-title-size)/1.3 var(--ui-font);letter-spacing:-.018em;margin:0;}
.sheet-section h3 {margin:0;font-size:var(--text-body);}
.sheet-icon,.sheet-editor-heading .project-dialog__dismiss {display:grid;place-items:center;width:30px;height:30px;flex:none;padding:5px;border:0;border-radius:50%;background:transparent;color:var(--icon-muted);}
.sheet-icon:hover,.sheet-icon:focus-visible {background:var(--wash);color:var(--ink);}
.sheet-icon svg,.sheet-editor svg.ui-icon {width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:var(--icon-stroke);}
.sheet-icon:is([data-action="expand-sheet-hours"],[data-action="collapse-sheet-hours"]) {color:var(--ink);}
.sheet-section address {font-style:normal;overflow-wrap:anywhere;line-height:1.55;}
.sheet-section address+.sheet-facts {margin-top:12px;}
.sheet-muted,.sheet-invite,.sheet-facts dt,.sheet-totals dt,.sheet-service>span,.sheet-rate time,.sheet-selection {color:var(--muted);}
.sheet-section p,.sheet-section dl {margin:0;}
.sheet-facts {display:grid;gap:9px;}
.sheet-facts>div {display:flex;align-items:baseline;justify-content:space-between;gap:14px;}
.sheet-facts dd,.sheet-totals dd {margin:0;font-variant-numeric:tabular-nums;}
.sheet-facts dd {text-align:right;min-width:0;overflow-wrap:anywhere;}
.sheet-totals {display:grid;gap:9px;}
.sheet-totals>div {display:flex;justify-content:space-between;align-items:baseline;gap:16px;}
.sheet-service {display:grid;gap:3px;padding-bottom:12px;}
.sheet-section strong {font-weight:550;}
.sheet-section address,.sheet-section p,.sheet-service,.sheet-documents,.sheet-entry>div,.sheet-facts dt {overflow-wrap:anywhere;}
.sheet-documents {display:grid;justify-items:start;gap:8px;}
.sheet-columns--hours .sheet-section .sheet-invite {margin-top:10px;}
/* Work is read top-to-bottom by day. Selection appears only when returning hours to a draft. */
[data-sheet-days] {container:hour-list / inline-size;}
.sheet-day + .sheet-day {margin-block-start:24px;}
.sheet-day h3 {font-size:var(--text-body);font-weight:550;}
.sheet-day ul {list-style:none;margin:0;padding:0;}
.sheet-entry {display:grid;grid-template-columns:minmax(0,1fr) minmax(9em,34%);align-items:start;gap:8px 20px;padding-block:8px;text-align:start;}
.sheet-entry + .sheet-entry {border-block-start:1px solid var(--line);}
.sheet-entry-main,.sheet-entry-billing {display:grid;align-content:start;min-width:0;}
.sheet-entry-billing {text-align:end;font-variant-numeric:tabular-nums;}
.sheet-entry-meta {color:var(--muted);text-align:inherit;text-wrap:pretty;}
.sheet-entry .sheet-activity {justify-self:start;font-weight:400;}
.sheet-include {display:flex;align-items:center;gap:8px;grid-column:1/-1;justify-self:start;cursor:pointer;}
.sheet-include input {width:16px;height:16px;margin:0;accent-color:var(--ink);}
.sheet-columns--hours .sheet-section-body > .sheet-selection {margin-block-start:16px;display:flex;justify-content:space-between;gap:12px;text-align:start;}
.sheet-selection strong {color:var(--ink);}
@container hour-list (max-width:335px) {
  .sheet-entry {grid-template-columns:1fr;row-gap:4px;}
  .sheet-entry-billing {display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;text-align:start;}
}
@container project-content (min-width:571px) {
  .sheet-columns.sheet-columns--hours {grid-template-columns:minmax(130px,.72fr) minmax(0,1.8fr);gap:24px;}
}
.project-sheet-workspace.diary-workspace:not(.diary-workspace--capture) { --calendar-width: max(240px, calc(296px * var(--calendar-width-scale))); }
.project-sheet-workspace:not(.diary-workspace--capture) > .sheet-calendar {min-width:0;padding-block-end:0;}
.project-sheet-workspace .sheet-actions {
  display:flex;
  flex-flow:row nowrap;
  align-items:flex-end;
  align-self:end;
  gap:6px;
  margin:auto 0 0;
}
@container diary-page (min-width:881px) {
  .project-sheet-workspace {
    --sheet-body-height:var(--notebook-height);
    height:var(--notebook-height);
    grid-template-rows:minmax(0,1fr);
    padding-block-end:0;
  }
  .project-sheet-workspace > .project-drawer {max-height:100%;}
  .project-sheet-workspace[data-projects-open="true"] > .project-drawer {height:100%;}
  .project-sheet-workspace:not(.diary-workspace--capture) > .sheet-calendar {
    height:100%;overflow:visible;gap:24px;padding-block-end:var(--work-action-lift);
  }
}
.sheet-editor-dialog {width:min(800px,calc(100vw - 48px));border:0;border-radius:0;box-shadow:none;max-height:calc(100svh - 48px);padding:0;}
.sheet-editor-dialog::backdrop {background:rgb(25 26 30 / .24);}
.sheet-editor-dialog>form {display:flex;flex-direction:column;gap:24px;padding:clamp(24px,3.5vw,48px);margin:0;max-height:calc(100svh - 48px);overflow:auto;}
.sheet-editor-heading {margin:0;}
.sheet-editor-heading .project-dialog__dismiss {position:static;}
.sheet-editor-heading .project-dialog__dismiss svg {width:18px;height:18px;}
.sheet-editor .project-dialog__grid {gap:16px 24px;}
.sheet-editor .project-dialog__field,.sheet-editor label.field {font:400 var(--text-body)/1.45 var(--work-body-font);}
.sheet-editor .project-dialog__grid :is(input,select,textarea) {font-size:var(--text-body);padding:7px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);}
.sheet-editor .sheet-editor-actions {align-self:end;margin-block-start:4px;}
.sheet-editor .project-dialog__details {grid-column:1/-1;}
.sheet-editor .workspace-help {margin:0;}
@container project-content (max-width:570px) {
  .sheet-columns {grid-template-columns:minmax(0,1fr);gap:0;}
}
@container project-content (min-width:571px) and (max-width:740px) {
  .sheet-columns {gap:28px;}
}
@container diary-page (max-width:880px) {
  .project-sheet-workspace>.project-drawer {grid-column:1/-1;max-height:12rem;}
  .project-sheet-workspace .sheet-content {max-height:none;overflow:visible;}
  .project-sheet-workspace {align-content:start;}
}
@container diary-page (max-width:620px) {
  .diary-workspace.project-sheet-workspace {grid-template-rows:auto auto 1fr;}
  .project-sheet-workspace>.sheet-calendar {justify-self:start;}
}
.sheet-totals button,.sheet-person,.sheet-activity {
  color:inherit;font:inherit;border:0;background:transparent;padding:0;text-align:left;
}
.sheet-person {display:flex;align-items:baseline;justify-content:space-between;width:100%;padding:6px 0;gap:10px;}
.sheet-person span:last-child {font-variant-numeric:tabular-nums;white-space:nowrap;}
.sheet-section button:is(.sheet-person,.sheet-activity):hover,.sheet-totals button:hover,.sheet-section button[aria-pressed=true] {text-decoration:underline;text-underline-offset:4px;}
.sheet-activity {font-weight:550;overflow-wrap:anywhere;}
.sheet-work-search {display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--line);}
.sheet-work-search .ui-icon {width:16px;height:16px;color:var(--muted);}
.sheet-work-search input {width:100%;min-width:0;padding:7px 0;border:0;background:transparent;font:inherit;}
.sheet-day[hidden],.sheet-entry[hidden] {display:none;}

.sheet-rates {width:100%;border-collapse:collapse;table-layout:auto;font:inherit;}
.sheet-rates th,.sheet-rates td {background:transparent;color:inherit;border:0;padding:4px 8px 4px 0;font:inherit;text-align:left;vertical-align:top;}
.sheet-rates thead th {color:var(--muted);}
.sheet-rates :is(th,td):last-child {padding-right:0;text-align:right;}
.sheet-rates td:last-child {white-space:nowrap;}

/* Both project views share their section geometry, typography and secondary dividers. */
.sheet-columns {
  --sheet-inset:var(--work-section-inset);
  --sheet-heading-gap:8px;
  --sheet-section-gap:24px;
  --sheet-row-height:24px;
  --sheet-rule:var(--line);
  row-gap:var(--sheet-section-gap);
}
[data-sheet-spacing="plain"] .sheet-columns {--sheet-rule:transparent;}
.sheet-columns > div {
  display:flex;
  flex-direction:column;
  gap:var(--sheet-section-gap);
  min-width:0;
}
.sheet-columns > div > * + * {position:relative;}
.sheet-columns > div > * + *::before {
  content:"";
  position:absolute;
  inset-inline:0;
  top:calc(var(--sheet-section-gap) / -2);
  border-block-start:1px solid var(--sheet-rule);
  pointer-events:none;
}
.sheet-columns .sheet-section {
  display:grid;
  gap:var(--sheet-heading-gap);
  min-width:0;
}
.sheet-columns .sheet-section > :is(header,summary) {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--sheet-inset);
  padding-inline-end:var(--sheet-inset);
}
.sheet-columns .sheet-section h2 {
  font-size:var(--work-section-size);
  line-height:var(--sheet-row-height);
  padding:4px var(--sheet-inset);
  overflow-wrap:anywhere;
}
.sheet-columns .sheet-section-body {
  display:grid;
  align-content:start;
  min-width:0;
  padding-inline:var(--sheet-inset);
  line-height:var(--sheet-row-height);
  text-align:justify;
}
.sheet-columns .sheet-section-body > * {min-width:0;margin:0;}
.sheet-columns .sheet-section-body address,
.sheet-columns .sheet-section-body .sheet-rates {line-height:inherit;}
.sheet-columns :is(.sheet-facts,.sheet-totals,.sheet-service,.sheet-documents) {
  row-gap:0;
  padding-block:0;
}
.sheet-columns :is(.sheet-facts,.sheet-totals) > div,
.sheet-columns .sheet-person,
.sheet-columns .sheet-service {
  display:grid;
  grid-template-columns:minmax(0,1fr) fit-content(65%);
  align-items:baseline;
  column-gap:var(--sheet-inset);
}
.sheet-columns .sheet-facts dd {text-align:end;white-space:pre-line;}
.sheet-columns .sheet-service p {grid-column:1 / -1;}
.sheet-columns :is(.sheet-facts dt,.sheet-totals dt,.sheet-service strong,.sheet-person span:first-child) {text-align:start;}
.sheet-columns .sheet-totals button,
.sheet-columns .sheet-person,
.sheet-columns .sheet-documents .text-link {text-align:inherit;}
.sheet-columns .sheet-person > span:first-child {min-width:0;}
.sheet-columns .sheet-totals dd,
.sheet-columns .sheet-service-price,
.sheet-columns .sheet-person > span:last-child,
.sheet-columns .sheet-rates :is(th,td):nth-last-child(2) {text-align:end;}
.sheet-columns .sheet-rates td {overflow-wrap:anywhere;}
.sheet-columns .sheet-person,
.sheet-columns .sheet-rates :is(th,td),
.sheet-columns .sheet-documents .text-link {padding-block:0;}
.sheet-columns .sheet-section-body address + .sheet-facts {margin:0;}
.sheet-content .sheet-title {margin-block-end:var(--work-heading-gap);}

/* Invoice history in the project overview. */
.sheet-invoice-history {
  display:grid;
  gap:8px;
}
.sheet-invoice-history__total,
.sheet-invoice-history li {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:var(--sheet-inset);
}
.sheet-invoice-history__total span,
.sheet-documents.sheet-invoice-drafts > span {
  color:var(--muted);
}
.sheet-invoice-history__total strong,
.sheet-invoice-history li > span {
  font-variant-numeric:tabular-nums;
  text-align:end;
  white-space:nowrap;
}
.sheet-invoice-history ul {
  display:grid;
  gap:0;
  margin:0;
  padding:0;
  list-style:none;
}
.sheet-invoice-history li {
  min-width:0;
}
.sheet-invoice-history li a {
  min-width:0;
  overflow-wrap:anywhere;
  color:inherit;
  text-decoration:underline;
  text-decoration-color:var(--line);
  text-underline-offset:3px;
}
.sheet-documents.sheet-invoice-drafts {
  gap:0;
  margin-top:8px;
}


/* The overview uses a single title row for disclosure and a separate edit or detail action. */
.sheet-columns .sheet-disclosure > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px 24px;
  column-gap: 4px;
}
.sheet-columns .sheet-disclosure > header > h2 {
  grid-area: 1 / 1 / 2 / -1;
  min-width: 0;
  padding: 0;
}
.sheet-disclosure .sheet-disclosure-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  gap: 8px;
  padding: 4px 3px 4px var(--sheet-inset);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
}
.sheet-disclosure > header:has(.sheet-icon) .sheet-disclosure-toggle > span {
  padding-inline-end: 34px;
}
.sheet-disclosure-toggle .ui-icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--icon-muted);
  stroke-width: var(--icon-stroke);
}
.sheet-disclosure-toggle[aria-expanded="true"] .ui-icon { transform: rotate(180deg); }
.sheet-disclosure > header > .sheet-icon { grid-area: 1 / 2; position: relative; }
.sheet-disclosure > header:has([aria-expanded="false"].sheet-disclosure-toggle) > .sheet-icon,
.sheet-columns .sheet-disclosure > [hidden] { display: none; }


/* Project section shortcuts */
.sheet-title.sheet-title--shortcuts {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: white;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: space-between;
  padding-block-end: 0;
  align-items: baseline;
  gap: 24px 12px;
}
@container diary-page (max-width: 880px) {
  /* At this width the page, rather than the project column, scrolls. */
  .sheet-title.sheet-title--shortcuts { inset-block-start: var(--top); }
}
.sheet-shortcuts {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-end: 4px;
}
.sheet-columns--overview .sheet-disclosure[data-shortcut-target] > header {
  background: var(--blue);
}

/* Project detail and expanded hours share the rules from views 155 and 156. */
.project-sheet-workspace .sheet-content {
  --line: #ded9d3;
  --title-rule: var(--line);
  --project-summary: #f7f6f4;
  --project-selection: #e5e9f2;
}
.project-sheet-workspace .sheet-columns { --sheet-heading-gap: 12px; }
.project-sheet-workspace .sheet-columns .sheet-section h2 {
  font-size: var(--text-section);
  padding-inline-start: 0;
}
.project-sheet-workspace .sheet-section > header { padding-inline-end: 0; }
.project-sheet-workspace :is(.sheet-section-body, .sheet-disclosure-toggle) { padding-inline-start: 0; }
.project-sheet-workspace .sheet-section-body { padding-inline-end: 0; }
.project-sheet-workspace .sheet-person {
  padding-block: 10px;
  border-block-end: 1px solid var(--sheet-rule);
  border-radius: 0;
}
.project-sheet-workspace .sheet-rates :is(th, td) {
  padding-block: 5px;
  border-block-end: 1px solid var(--sheet-rule);
}
.project-sheet-workspace .sheet-columns--overview .sheet-section:has(.sheet-totals) {
  container: project-overview-totals / inline-size;
}
@container project-overview-totals (min-width: 420px) {
  .project-sheet-workspace .sheet-columns--overview .sheet-totals {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .project-sheet-workspace .sheet-columns--overview .sheet-totals > div {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 4px;
    text-align: center;
  }
  .project-sheet-workspace .sheet-columns--overview .sheet-totals > div:first-child { justify-items: start; }
  .project-sheet-workspace .sheet-columns--overview .sheet-totals > div:last-child { justify-items: end; }
}

/* The editable rate replaces its history row and shares the table's columns. */
.sheet-editor-dialog.sheet-rate-dialog {
  --dialog-pad: clamp(20px, 3vw, 34px);
  --rate-function-width: 9rem;
  --rate-date-width: 8.25rem;
  --rate-amount-width: 6.75rem;
  --rate-action-width: 1.75rem;
  --rate-column-padding: 20px;
  --rate-row-padding: 16px;
  --rate-dialog-gap: 28px;
  --line: #ded9d3;
  width: min(660px, calc(100vw - 24px));
  max-width: none;
}
.sheet-rate-dialog > .sheet-editor { gap: var(--rate-dialog-gap); }
.sheet-rate-dialog #sheet-rate-title:focus { outline: 0; }
.sheet-rate-history { width: 100%; table-layout: fixed; border-collapse: collapse; }
.sheet-rate-history tbody { font-family: var(--work-body-font); }
.sheet-rate-history-function { width: var(--rate-function-width); }
.sheet-rate-history-date { width: var(--rate-date-width); }
.sheet-rate-history-amount { width: var(--rate-amount-width); }
.sheet-rate-history-action { width: var(--rate-action-width); }
.sheet-rate-history :is(th, td) {
  padding: var(--rate-row-padding) var(--rate-column-padding) var(--rate-row-padding) 0;
  border: 0;
  border-block-end: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sheet-rate-history thead th { padding-block: 0 12px; color: var(--muted); }
.sheet-rate-history :is(th, td):last-child { padding-inline-end: 0; }
.sheet-rate-history tbody tr:last-child:not([data-rate-editor]) > :is(th, td) { border-block-end: 1px solid var(--line); }
.sheet-rate-history tbody tr[data-rate-editor] > td { border-block-end: 0; }
.sheet-rate-history tbody th { font-weight: 550; }
.sheet-rate-history tbody .sheet-rate-function { color: var(--muted); }
.sheet-rate-history :is(time, .sheet-rate-amount) { font-variant-numeric: tabular-nums; }
.sheet-rate-history time { white-space: nowrap; }
.sheet-rate-history .sheet-rate-amount { text-align: end; }
.sheet-rate-history td:last-child > .sheet-icon { margin-block: -5px; }
.sheet-rate-history tbody .sheet-rate-missing { color: var(--muted); }
.sheet-rate-note { margin: 16px 0 0; color: var(--muted); }
.sheet-rate-dialog [data-rate-editor] :is(input, select) {
  display: block;
  width: 100%;
  min-width: 0;
  height: 1.45em;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 -1px var(--line);
}
.sheet-rate-dialog [data-rate-editor] :is(input, select):focus-visible {
  outline: 0;
  box-shadow: inset 0 -1px var(--focus);
}
.sheet-rate-dialog [data-rate-editor] [name="price"] {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.sheet-rate-dialog [data-rate-editor] [name="person"] { appearance: none; padding-inline-end: 18px; font-weight: 550; }
.sheet-rate-dialog [data-rate-editor] [name="personFunction"] { color: var(--muted); }
.sheet-rate-person-control, .sheet-rate-date-control { position: relative; }
.sheet-rate-person-control > .ui-icon {
  position: absolute;
  inset: 2px 0 auto auto;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.sheet-rate-date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.sheet-rate-date-control > .sheet-icon { width: 21px; height: 20px; padding: 2px; }
.sheet-rate-date-control > .sheet-icon svg { width: 15px; height: 15px; }
.sheet-rate-dialog [data-rate-editor] .sheet-rate-native-date {
  position: absolute;
  inset: auto 0 0 auto;
  width: 21px;
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 560px) {
  .sheet-editor-dialog.sheet-rate-dialog {
    --dialog-pad: 16px;
    --rate-function-width: 96px;
    --rate-date-width: 94px;
    --rate-amount-width: 56px;
    --rate-action-width: 1.375rem;
    --rate-column-padding: 5px;
    --rate-row-padding: 12px;
    --rate-dialog-gap: 22px;
    width: calc(100vw - 16px);
  }
  .sheet-rate-dialog > .sheet-editor { padding-inline: 12px; }
  .sheet-rate-history td:last-child > .sheet-icon { width: var(--rate-action-width); }
  .sheet-rate-dialog [data-rate-editor] [name="person"] { padding-inline-end: 12px; }
  .sheet-rate-person-control > .ui-icon { width: 11px; }
  .sheet-rate-date-control > .sheet-icon { width: 15px; padding: 0; }
}
@media (max-width: 365px) {
  .sheet-editor-dialog.sheet-rate-dialog {
    --rate-function-width: 23%;
    --rate-date-width: 5.5rem;
    --rate-amount-width: 3.6rem;
    --rate-action-width: 1.4rem;
  }
  .sheet-rate-date-control > [data-rate-pick] { display: none; }
}

.project-sheet-workspace .sheet-title h1,
.project-sheet-workspace .sheet-columns .sheet-section h2 { font: var(--section-heading); letter-spacing: normal; }

@container diary-page (min-width: 881px) {
  .project-sheet-workspace .sheet-title h1 {
    padding-block-start: calc((var(--drawer-heading-height) - 1lh) / 2);
  }
}

.diary-calendar-column:has(> [data-component="C19"]) { position: relative; }
.diary-calendar-column > [data-component="C19"] { position: absolute; top: 3px; right: 0; z-index: 1; }
.diary-calendar-column:has(> [data-component="C19"]) .calendar-month-name { margin-inline-end: 32px; }
@container diary-page (min-width: 881px) {
  .project-sheet-workspace:has([data-project-calendar][hidden]) > .sheet-content {
    grid-column: -3 / -1; grid-row: 1; margin-block-end: calc(76px + var(--work-action-lift) + 12px);
  }
  .project-sheet-workspace:has([data-project-calendar][hidden]) .sheet-title { padding-inline-end: 36px; }
  .project-sheet-workspace:has([data-project-calendar][hidden]) > .sheet-calendar {
    grid-column: -2 / -1; grid-row: 1; z-index: 3; pointer-events: none;
  }
  .sheet-calendar :is(.sheet-actions, [data-component="C19"]) { pointer-events: auto; }
}
