* {
  box-sizing: border-box;
  margin: 0;
}
[hidden] {
  display: none !important;
}
body {
  font-family: var(--sans);
  font-size: var(--type-body);
  line-height: var(--leading-text);
  color: var(--ink);
  background: var(--page);
  display: flex;
  min-height: 100vh;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3 {
  line-height: var(--leading-tight);
  font-weight: 500;
}
.px {
  flex: none;
  display: block;
}
.px .tint {
  fill: var(--light-blue);
}
.icon {
  width: var(--icon);
  height: var(--icon);
  flex: none;
  display: block;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 2;
  width: var(--sidebar-width);
  flex: none;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: var(--s4) var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px var(--s4);
  font-weight: 700;
  font-size: 17px;
}
.sidebar a.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--text-2);
}
.sidebar a.nav:hover {
  background: var(--active);
}
.sidebar a.nav.on {
  background: var(--active);
  color: var(--ink);
  font-weight: 500;
}
.sidebar .gap {
  flex: 1;
}
.sidebar .signout {
  background: none;
  border: 0;
  padding: var(--s2) 10px;
  font-size: var(--type-small);
  color: var(--text-2);
  cursor: pointer;
}

main {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: var(--s5) var(--s6) var(--s7);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
main > * {
  position: relative;
  z-index: 1;
}
main > .top,
main > .time-strip {
  z-index: 3;
}
main > .weather {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 1204px;
  max-width: none;
  pointer-events: none;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s4);
  margin-bottom: var(--gap-section);
}
h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--type-title);
  letter-spacing: -1px;
  line-height: 1;
}
.sub {
  color: var(--text-2);
  margin-top: var(--s3);
}
.btns {
  display: flex;
  gap: var(--s2);
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-icon);
  height: var(--control);
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  padding: 0 22px;
  font-size: var(--type-small);
  background: var(--ink);
  color: var(--page);
  white-space: nowrap;
  cursor: pointer;
}
.pill.outline {
  background: var(--veil-strong);
  color: var(--ink);
}
.pill.small {
  height: var(--control-small);
  padding: 0 var(--s3);
  font-size: var(--type-small);
}
.pill:disabled {
  opacity: 0.35;
  cursor: default;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-icon);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: inherit;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-small);
  height: var(--control-small);
  flex: none;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: none;
  color: var(--text-2);
  cursor: pointer;
}
.icon-button:hover {
  background: var(--active);
  color: var(--ink);
}
.sure {
  color: var(--error) !important;
  border-color: var(--error) !important;
  background: var(--error-bg) !important;
  text-decoration: none;
}
.link.sure,
.icon-button.sure {
  width: auto;
  padding: 2px var(--s2);
  border: 1px solid var(--error);
  border-radius: var(--radius-tag);
}

.lab {
  display: flex;
  align-items: center;
  gap: var(--gap-icon);
  font-size: var(--type-label);
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--text-2);
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--type-tag);
  line-height: 1.4;
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: var(--radius-tag);
  padding: 2px var(--s2);
  white-space: nowrap;
  background: var(--page);
  color: var(--ink);
}
.tag.blue {
  background: var(--light-blue);
}
.tag.green {
  background: var(--success-bg);
  color: var(--success);
}
.tag.amber {
  background: var(--warning-bg);
  color: var(--warning);
}
.tag.red {
  background: var(--error-bg);
  color: var(--error);
}
.tags {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}
.tag-gap {
  margin-right: var(--s3);
}
.card {
  background: var(--page);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}
.num {
  font-weight: 700;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.grey {
  color: var(--text-2);
}
.small {
  font-size: var(--type-small);
}
.right {
  text-align: right;
  justify-content: flex-end;
}
.underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pre {
  white-space: pre-line;
}
.push-right {
  margin-left: auto;
}
.narrow {
  max-width: 640px;
}
.error {
  color: var(--error);
  font-size: var(--type-small);
}
.saved {
  font-size: var(--type-small);
  color: var(--text-2);
  min-height: 1.5em;
}
.empty {
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s4) 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--gap-label);
  min-width: 0;
}
.field > label,
.field-label {
  font-size: var(--type-small);
  font-weight: 500;
}
.field input,
.field select,
.field textarea,
.search input,
.switcher-search,
.duration-input input,
.add-person select,
.variable-row input,
.variable-row select,
.suffix,
.money-input {
  height: var(--control);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: var(--type-body);
  background-color: var(--page);
  color: var(--ink);
}
.field textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 14px;
  line-height: var(--leading-text);
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.search input:focus,
.switcher-search:focus,
.duration-input input:focus,
.variable-row input:focus,
.suffix:focus-within,
.money-input:focus-within {
  outline: none;
  border-color: var(--ink);
}
.field input[readonly] {
  color: var(--text-2);
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--chevron-down);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: var(--icon);
  padding-right: 40px !important;
  cursor: pointer;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  display: none;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  cursor: pointer;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}
.suffix,
.money-input {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 14px;
}
.suffix input,
.money-input input {
  border: 0;
  outline: none;
  background: none;
  height: 100%;
  flex: 1;
  min-width: 0;
  padding: 0;
  font-size: inherit;
}
.suffix span,
.money-input span {
  color: var(--text-2);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-icon);
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
.check.small {
  font-size: var(--type-small);
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
}
.row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.row-item:last-child {
  border-bottom: 0;
}
.new-row {
  display: flex;
  align-items: center;
  gap: var(--gap-icon);
  padding: 12px 0;
}

.list {
  flex: 1;
  min-width: 0;
}
.th,
.tr {
  display: grid;
  gap: var(--s3);
  align-items: center;
}
.th {
  padding: 0 var(--s3) 12px;
  border-bottom: 1px solid var(--line);
}
.tr {
  padding: var(--s3);
  border-bottom: 1px solid var(--line-soft);
}
.tr:hover {
  background: var(--sidebar);
}
.tr b {
  display: block;
  font-weight: 500;
}
.tr .small {
  display: block;
}
.table-empty {
  padding: var(--s4) var(--s3);
}
.contacts-cols {
  grid-template-columns: 2.2fr 1.4fr 1fr;
}
.deals-cols {
  grid-template-columns: 2.4fr 1fr 1fr;
}
.documents-cols {
  grid-template-columns: 110px 2fr 1fr 1fr;
}
.templates-cols {
  grid-template-columns: 110px 2fr 1fr 1.6fr;
}
.projects-cols {
  grid-template-columns: 110px 2fr 1.2fr 1.2fr 0.8fr 0.8fr 0.8fr;
}
.group-label {
  padding: var(--s5) var(--s3) var(--s2);
}
.who {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
}
.who > div {
  min-width: 0;
}
.who span {
  display: block;
  font-size: var(--type-small);
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
}
.initials {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-tag);
  background: var(--light-blue);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--type-small);
  flex: none;
}
.initials.big {
  width: 56px;
  height: 56px;
  font-size: 18px;
  margin-bottom: var(--s4);
}
.search {
  max-width: 400px;
  margin-bottom: var(--s5);
}
.search input {
  border-radius: var(--pill);
  padding: 0 var(--s4);
}
.tabs {
  display: flex;
  gap: var(--s5);
  color: var(--text-2);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.tabs a.on {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 8px;
}
.page-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  font-size: var(--type-small);
  color: var(--text-2);
  margin-top: auto;
  padding-top: var(--s5);
}
.page-foot a {
  color: var(--ink);
}

.seg {
  display: flex;
  height: var(--control);
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  padding: 3px;
  background: var(--veil-strong);
}
.seg a {
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: var(--pill);
  font-size: var(--type-small);
}
.seg a.on {
  background: var(--ink);
  color: var(--page);
}
.menu-wrap {
  position: relative;
}
.menu-wrap .menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s2));
  z-index: 10;
  min-width: 200px;
  padding: var(--s2);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.menu-wrap .menu a,
.menu-wrap .menu button {
  padding: 10px 12px;
  border-radius: var(--radius);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: var(--type-body);
}
.menu-wrap .menu a:hover,
.menu-wrap .menu button:hover {
  background: var(--active);
}
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: var(--s4);
  align-items: start;
}
.column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: var(--s1);
}
.column-head b {
  font-weight: 500;
}
.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.dragging .cards {
  min-height: 72px;
}
.deal-card {
  padding: var(--s3) 18px;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  cursor: grab;
}
.deal-card.won {
  background: var(--light-blue);
  cursor: pointer;
}
.deal-card.dragging {
  opacity: 0.5;
}
.deal-title {
  font-weight: 500;
  font-size: 17px;
  line-height: var(--leading-tight);
}
.deal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s1);
}
.deal-meta b {
  font-weight: 500;
}
.add-row {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px var(--s3);
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: var(--gap-icon);
  background: var(--veil);
}
.card-confirm {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: 1px solid var(--line-soft);
  font-size: var(--type-small);
}

.peek,
.dialog {
  margin: auto;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--page);
  color: var(--ink);
  box-shadow: var(--shadow-strong);
}
.peek::backdrop,
.dialog::backdrop {
  background: var(--backdrop);
}
.peek {
  width: min(920px, calc(100vw - 32px));
  height: min(90vh, 1000px);
  overflow: hidden;
}
.peek[open] {
  display: flex;
  flex-direction: column;
}
.dialog {
  width: min(480px, calc(100vw - 32px));
}
.dialog-body {
  display: flex;
  flex-direction: column;
  gap: var(--gap-field);
  padding: var(--s5);
}
.dialog-heading {
  font-size: var(--type-heading);
  line-height: var(--leading-tight);
}
.dialog-heading b {
  font-weight: 500;
}
.peek-bar {
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line-soft);
}
.peek-tool {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-icon);
  height: var(--control-small);
  border: 0;
  background: none;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: var(--type-small);
  color: var(--text-2);
  cursor: pointer;
}
.peek-tool:hover {
  background: var(--active);
  color: var(--ink);
}
.peek-close {
  margin-left: auto;
  width: var(--control-small);
  padding: 0;
  justify-content: center;
}
.peek-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s6) var(--s7) var(--s7);
}
.peek-page {
  max-width: 820px;
  display: flex;
  flex-direction: column;
}
.back-link {
  color: var(--text-2);
  font-size: var(--type-small);
  margin-bottom: var(--s4);
}
.peek-doc {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.peek-title,
.peek-heading {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--type-title-small);
  letter-spacing: -0.5px;
  line-height: var(--leading-tight);
}
.peek-title {
  border: 0;
  padding: 0;
  width: 100%;
  background: none;
  outline: none;
}
.peek-heading {
  margin: var(--s2) 0 var(--s4);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
}
.props {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.prop {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
  gap: var(--s3);
}
.prop-label {
  display: flex;
  align-items: center;
  gap: var(--gap-icon);
  min-height: var(--control-small);
  color: var(--text-2);
}
.prop-value {
  min-height: var(--control-small);
  display: flex;
  align-items: center;
  min-width: 0;
}
.prop-value > input,
.prop-value > select,
.prop-value > textarea,
.prop-value .money-input {
  height: var(--control-small);
  width: 100%;
  max-width: 420px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background-color: transparent;
  padding: 0 var(--s2);
  margin-left: calc(-1 * var(--s2));
  font-size: var(--type-body);
}
.prop-value > textarea {
  height: auto;
  min-height: var(--control-small);
  padding: 6px var(--s2);
  resize: vertical;
}
.prop-value > input:hover,
.prop-value > select:hover,
.prop-value > textarea:hover,
.prop-value .money-input:hover {
  background-color: var(--active);
}
.prop-value > input:focus,
.prop-value > select:focus,
.prop-value > textarea:focus,
.prop-value .money-input:focus-within {
  outline: none;
  border-color: var(--ink);
  background-color: var(--page);
}
.prop-value input::placeholder,
.prop-value textarea::placeholder {
  color: var(--text-2);
}
.peek-section {
  margin-top: var(--gap-section);
  padding-top: var(--s5);
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.peek-section .btns {
  margin-top: var(--s2);
}
.peek-actions {
  margin-top: var(--s4);
}
.peek-notes {
  border: 0;
  resize: vertical;
  min-height: 120px;
  font-size: var(--type-body);
  line-height: var(--leading-text);
  padding: 0;
  background: none;
  outline: none;
}
.money-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
.money-figure {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.money-figure b {
  font-size: var(--type-figure-small);
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.activity {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.activity li {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.when-fixed,
.when-share,
.when-daily {
  display: none;
}
.project-form:has(input[name="billing"][value="fixed"]:checked) .when-fixed,
.project-form:has(input[name="billing"][value="revenue_share"]:checked)
  .when-share {
  display: block;
}
.peek-body:has(.project-form input[name="billing"][value="daily"]:checked)
  .when-daily,
.peek-page:has(.project-form input[name="billing"][value="daily"]:checked)
  .when-daily {
  display: block;
}

.staffing-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.staffing-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: var(--type-small);
}
.staffing-table th,
.staffing-table td {
  padding: var(--s2) 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
  background: var(--page);
}
.staffing-table th {
  font-weight: 400;
  font-size: var(--type-label);
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--text-2);
}
.staffing-table tfoot td {
  font-weight: 500;
  border-bottom: 0;
}
.staffing-table .pin {
  position: sticky;
  z-index: 1;
}
.staffing-table .pin-1 {
  left: 0;
  width: 150px;
  min-width: 150px;
}
.staffing-table .pin-2 {
  left: 150px;
  width: 140px;
  min-width: 140px;
}
.staffing-table .pin-3 {
  left: 290px;
  width: 72px;
  min-width: 72px;
}
.staffing-table .pin-4 {
  left: 362px;
  width: 104px;
  min-width: 104px;
  border-right: 1px solid var(--line);
}
.staffing-table .money-input {
  height: var(--control-small);
  padding: 0 10px;
  font-size: var(--type-small);
}
.days-input {
  width: 64px;
  height: var(--control-small);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 var(--s2);
  font-size: var(--type-small);
  text-align: right;
}
.days-input:focus {
  outline: none;
  border-color: var(--ink);
}
.add-person {
  display: flex;
  gap: var(--s2);
  align-items: center;
}
.add-person select {
  width: auto;
  height: var(--control-small);
  font-size: var(--type-small);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  align-content: start;
}
.panel {
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  gap: var(--gap-field);
}
.panel-actions {
  margin-top: var(--s2);
}
.logo-field {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  min-height: var(--control);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s2) 14px;
}
.logo-preview img,
.logo-field img {
  height: 36px;
  width: auto;
  display: block;
}
.add-user {
  display: flex;
  flex-direction: column;
  gap: var(--gap-field);
  margin-top: var(--s4);
}

body.signin main {
  justify-content: center;
  min-height: 100vh;
}
.signin-box {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-width: 420px;
}
.signin-box .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: var(--s4);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  column-gap: var(--s6);
  row-gap: var(--gap-section);
  flex: 1;
  align-items: center;
}
.home-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}
.stats {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}
.stat .num {
  font-size: var(--type-figure);
  margin: 12px 0 var(--s2);
}
.home-timer {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.today {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.todo-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.todo-list:empty {
  display: none;
}
.todo {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}
.todo input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  flex: none;
  margin-top: 4px;
  background: var(--veil);
  cursor: pointer;
}
.todo input:checked {
  background: var(--ink);
}
.todo.done span {
  text-decoration: line-through;
  color: var(--text-2);
}
.add-todo {
  display: flex;
  align-items: center;
  gap: var(--gap-icon);
  height: var(--control);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--text-2);
  margin: 15px 0 15px 0;
}
.add-todo:focus-within {
  border-color: var(--ink);
  color: var(--ink);
}
.add-todo input {
  border: 0;
  outline: none;
  flex: 1;
  min-width: 0;
  background: none;
  font-size: var(--type-body);
}
.add-todo i {
  font-style: normal;
  font-size: var(--type-tag);
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius-tag);
  padding: 2px 6px;
}
.nudge {
  border-top: 1px solid var(--line);
  padding-top: var(--s3);
  font-size: var(--type-small);
  color: var(--text-2);
}

.timer {
  position: relative;
}
.timer-sun {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  width: 100%;
}
.timer-strip {
  display: flex;
  align-items: center;
  gap: var(--s5);
  flex-wrap: wrap;
}
.timer-strip .timer-controls {
  margin-left: auto;
}
.timer.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  color: var(--text-2);
}
.timer-controls {
  justify-content: center;
}
.switcher {
  position: relative;
  max-width: 100%;
}
.projsel {
  display: flex;
  align-items: center;
  gap: var(--gap-icon);
  height: var(--control);
  background: var(--page);
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  padding: 0 18px 0 12px;
  cursor: pointer;
  max-width: 100%;
}
.projsel b {
  font-weight: 500;
  font-size: var(--type-label);
  letter-spacing: var(--label-spacing);
}
.projsel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.switcher-menu {
  position: absolute;
  top: calc(100% + var(--s2));
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: var(--s2);
  z-index: 10;
  background: var(--page);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  max-height: 380px;
  overflow-y: auto;
}
.timer-strip .switcher-menu {
  left: 0;
  transform: none;
}
.switcher-search {
  margin-bottom: var(--s1);
}
.switcher-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.switcher-row:hover,
.switcher-row.on {
  background: var(--active);
}
.switcher-row > span {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.switcher-row b {
  font-weight: 500;
}
.switcher-row .grey {
  font-size: var(--type-small);
}
.switcher-row code {
  font-family: inherit;
  font-size: var(--type-tag);
  letter-spacing: var(--label-spacing);
  color: var(--text-2);
  width: 72px;
}
.sunwrap {
  position: relative;
  width: min(396px, 100%);
  aspect-ratio: 1;
}
.sunwrap .sun {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.sun-digits {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54.5%;
  transform: translate(-50%, -62%);
}
.sun-digits .px {
  width: 100%;
  height: auto;
}
.sun-units {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translateX(-50%);
  width: 56.5%;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  font-size: var(--type-label);
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--text-2);
}

.time-strip {
  padding: var(--s4) var(--pad-card);
  margin-bottom: var(--gap-section);
  background: var(--light-blue);
}
.time-layout {
  display: flex;
  gap: var(--s6);
  align-items: flex-start;
}
.entries {
  flex: 1;
  min-width: 0;
}
.week-nav {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.week-nav .icon-button {
  border-color: var(--ink);
  color: var(--ink);
}
.week-label {
  font-weight: 500;
  white-space: nowrap;
}
.day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: var(--s3) 0;
}
.day-head b {
  font-weight: 500;
}
details.day > summary {
  cursor: pointer;
}
details.day > summary .icon {
  transition: transform 0.15s;
}
details.day[open] > summary .icon {
  transform: rotate(90deg);
}
details.day {
  margin-bottom: var(--s2);
}
.entry {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line-soft);
}
.entry:hover {
  background: var(--sidebar);
}
.entry-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.entry-text b {
  font-weight: 500;
}
.entry-duration {
  min-width: 72px;
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.calendar {
  --hours-width: 44px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  user-select: none;
}
.calendar-row {
  display: grid;
  grid-template-columns: var(--hours-width) repeat(7, minmax(0, 1fr));
}
.calendar-heads {
  border-bottom: 1px solid var(--line-soft);
}
.calendar-day-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s2);
  white-space: nowrap;
  min-width: 0;
  border-left: 1px solid var(--line-soft);
  font-size: var(--type-small);
}
.calendar-day-head b {
  font-weight: 500;
  font-size: var(--type-label);
}
.calendar-day-head.today .lab {
  color: var(--ink);
  font-weight: 500;
}
.calendar-untimed-row {
  border-bottom: 1px solid var(--line-soft);
}
.calendar-untimed-row > .lab,
.calendar-hours span {
  font-size: var(--type-tag);
}
.calendar-untimed-row > .lab {
  padding: var(--s2) var(--s1);
  align-self: start;
}
.calendar-untimed {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s1);
  border-left: 1px solid var(--line-soft);
  min-width: 0;
}
.calendar-chip,
.calendar-block {
  display: flex;
  gap: var(--s1);
  padding: 2px 6px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-tag);
  background: var(--light-blue);
  font-size: var(--type-label);
  line-height: var(--leading-tight);
  min-width: 0;
  overflow: hidden;
}
.calendar-chip {
  justify-content: space-between;
  white-space: nowrap;
}
.calendar-chip b,
.calendar-block b {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-chip.billed,
.calendar-block.billed {
  background: var(--success-bg);
  border-color: var(--success);
}
.calendar-grid {
  height: calc(var(--calendar-hour) * 24);
}
.calendar-hours {
  position: relative;
}
.calendar-hours span {
  position: absolute;
  top: var(--top);
  right: var(--s1);
  transform: translateY(-50%);
  color: var(--text-2);
  letter-spacing: var(--label-spacing);
}
.calendar-hours span:first-child {
  transform: none;
}
.calendar-column {
  position: relative;
  border-left: 1px solid var(--line-soft);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--line-soft) 0 1px,
    transparent 1px var(--calendar-hour)
  );
  cursor: crosshair;
}
.calendar-column.today {
  background-color: var(--sidebar);
}
.calendar-block {
  position: absolute;
  top: var(--top);
  height: var(--height);
  min-height: 18px;
  left: calc(100% / var(--lanes) * var(--lane) + 2px);
  width: calc(100% / var(--lanes) - 4px);
  flex-direction: column;
  container-type: size;
  cursor: pointer;
  z-index: 1;
}
.calendar-block-line {
  display: flex;
  justify-content: space-between;
  gap: var(--s1);
  white-space: nowrap;
}
.calendar-block-line span {
  flex: none;
}
.calendar-block-note {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@container (max-height: 34px) {
  .calendar-block-note {
    display: none;
  }
}
.calendar-ghost {
  position: absolute;
  left: 2px;
  right: 2px;
  border: 1px dashed var(--ink);
  border-radius: var(--radius-tag);
  background: var(--veil);
  font-size: var(--type-label);
  padding: 2px 6px;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
}
.time-layout.calendar-mode {
  flex-direction: column;
  gap: var(--gap-section);
}
.time-layout.calendar-mode .entries {
  width: 100%;
}
.time-layout.calendar-mode .week {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--s6);
  align-items: start;
}
.time-layout.calendar-mode .project-bars,
.time-layout.calendar-mode .unbilled {
  margin-top: 0;
}
.time-layout.calendar-mode .unbilled {
  border-top: 0;
  padding-top: 0;
}
.week {
  width: 340px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.big-figure {
  font-size: var(--type-figure);
  margin: var(--s2) 0;
}
.medium-figure {
  font-size: var(--type-figure-small);
  font-weight: 700;
  letter-spacing: -1px;
}
.project-bars {
  margin-top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.project-bars > div {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  font-size: var(--type-small);
}
.bar-label {
  display: flex;
  justify-content: space-between;
}
.bar {
  display: inline-flex;
  gap: 3px;
}
.bar i {
  width: 11px;
  height: 11px;
  background: var(--light-blue);
  border: 1px solid var(--ink);
}
.bar i.on {
  background: var(--ink);
}
.unbilled {
  margin-top: var(--s5);
  border-top: 1px solid var(--line);
  padding-top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  align-items: flex-start;
}
.unbilled .menu {
  left: 0;
  right: auto;
}
.duration-input {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.duration-input input {
  width: 88px;
}
.duration-input span {
  color: var(--text-2);
}
.peek-doc > .grey {
  margin-bottom: var(--s2);
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
}
.editor-layout.invoice-layout {
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
}
.editor-side {
  display: flex;
  flex-direction: column;
  gap: var(--gap-field);
  min-width: 0;
}
.editor-box {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--page);
}
.editor-box .toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px var(--s2);
  border-bottom: 1px solid var(--line-soft);
  background: var(--sidebar);
  border-radius: var(--radius) var(--radius) 0 0;
}
.editor-box .toolbar button {
  height: 28px;
  min-width: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: none;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.editor-box .toolbar button:hover {
  background: var(--active);
}
.editor-box .toolbar button.on {
  background: var(--ink);
  color: var(--page);
}
.editor-box .tool-bold {
  font-weight: 700;
}
.editor-box .tool-italic {
  font-style: italic;
  font-family: var(--serif);
  font-size: 15px;
}
.editor-box .tool-underline {
  text-decoration: underline;
}
.toolbar-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
  margin: 0 var(--s1);
}
.editor-surface .ProseMirror {
  min-height: 520px;
  padding: var(--s4);
  outline: none;
  font-size: var(--type-small);
  line-height: var(--leading-text);
}
.editor-surface .ProseMirror h2 {
  font-size: 18px;
  margin: var(--s4) 0 var(--s2);
}
.editor-surface .ProseMirror h3 {
  font-size: var(--type-body);
  margin: var(--s3) 0 var(--s1);
}
.editor-surface .ProseMirror h4 {
  font-size: var(--type-tag);
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 500;
  margin: var(--s3) 0 var(--s1);
}
.editor-surface .ProseMirror > :first-child {
  margin-top: 0;
}
.editor-surface .ProseMirror p {
  margin: 0 0 6px;
}
.editor-surface .ProseMirror ul {
  padding-left: 1.4em;
  margin: 0 0 6px;
}
.editor-surface .ProseMirror table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--s2) 0;
  table-layout: fixed;
}
.editor-surface .ProseMirror th,
.editor-surface .ProseMirror td {
  position: relative;
  border: 1px solid var(--line);
  padding: 4px var(--s2);
  vertical-align: top;
}
.editor-surface .ProseMirror th {
  background: var(--active);
}
.editor-surface .ProseMirror .selectedCell {
  background: var(--light-blue);
}
.editor-surface .ProseMirror .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--light-blue);
  pointer-events: none;
}
.editor-surface .ProseMirror.resize-cursor {
  cursor: col-resize;
}
.editor-surface .ProseMirror .tableWrapper {
  overflow-x: auto;
}
.table-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: var(--s1);
  background: var(--page);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.table-menu button {
  border: 0;
  background: none;
  border-radius: 4px;
  padding: 6px var(--s2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.table-menu button:hover {
  background: var(--active);
}
.table-menu button[data-command^="delete"] {
  color: var(--error);
}
.variables code {
  font-size: 13px;
}
.variable-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: var(--s2);
  align-items: center;
}
.variable-row input,
.variable-row select {
  height: var(--control-small);
  font-size: var(--type-small);
}

.preview {
  width: 100%;
}
.preview-pages {
  position: relative;
  width: 100%;
  min-height: 240px;
  overflow: hidden;
}
.preview-page-frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: top left;
  background: transparent;
}
.editor-layout .preview {
  position: sticky;
  top: var(--s4);
  max-height: calc(100vh - var(--s6));
  overflow-y: auto;
}
.preview-only {
  max-width: 820px;
}

.line-row {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line-soft);
}
.line-numbers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) var(
      --control-small
    );
  gap: var(--s3);
  align-items: end;
}
.line-total {
  height: var(--control);
  display: flex;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.line-numbers .icon-button {
  margin-bottom: 4px;
}

body.shared {
  display: block;
  background: var(--sidebar);
}
.shared-page {
  max-width: calc(210mm + var(--s5));
  margin: 0 auto;
  padding: var(--s4) var(--s3) var(--s7);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.shared-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shared-brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 700;
}

@media (max-width: 1000px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-timer {
    order: -1;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: var(--rail-width);
    padding: var(--s3) 10px;
    align-items: center;
  }
  .sidebar .logo {
    padding: 0 0 var(--s4);
  }
  .sidebar .logo span,
  .sidebar a.nav span,
  .sidebar .signout {
    display: none;
  }
  .sidebar a.nav {
    padding: 9px;
  }
  main {
    padding: var(--s4) var(--s3) var(--s6);
  }
  h1 {
    font-size: var(--type-title-small);
  }
  .top {
    flex-direction: column;
    margin-bottom: var(--s5);
  }
  .two,
  .settings-grid,
  .editor-layout,
  .editor-layout.invoice-layout {
    grid-template-columns: 1fr;
  }
  .board {
    overflow-x: auto;
    grid-template-columns: repeat(4, 240px);
    padding-bottom: var(--s3);
  }
  .contacts-cols {
    grid-template-columns: 1fr;
  }
  .contacts-cols > :not(:first-child) {
    display: none;
  }
  .deals-cols {
    grid-template-columns: 1fr auto;
  }
  .deals-cols > :nth-child(2) {
    display: none;
  }
  .documents-cols {
    grid-template-columns: 1fr auto;
  }
  .documents-cols > :nth-child(1),
  .documents-cols > :nth-child(4) {
    display: none;
  }
  .templates-cols {
    grid-template-columns: 1fr;
  }
  .templates-cols > :not(:nth-child(2)):not(:nth-child(4)) {
    display: none;
  }
  .projects-cols {
    grid-template-columns: 1fr auto;
  }
  .projects-cols > :not(:nth-child(2)):not(:nth-child(3)) {
    display: none;
  }
  .peek {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: 0;
  }
  .peek-body {
    padding: var(--s4) var(--s3) var(--s6);
  }
  .prop {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--s4);
  }
  .stat .num {
    font-size: var(--type-title-small);
  }
  .time-layout {
    flex-direction: column;
  }
  .week {
    width: 100%;
  }
  .timer-strip {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s3);
  }
  .timer-strip .switcher,
  .timer-strip .projsel {
    width: 100%;
  }
  .timer-strip .strip-digits .px {
    width: 100%;
    max-width: 260px;
    height: auto;
  }
  .timer-strip .timer-controls {
    /* margin-left: 0; */
    justify-content: flex-start;
    margin: 30px 0 0px 0;
  }
  .timer-strip .switcher-menu {
    width: 100%;
  }
  .entry {
    flex-wrap: wrap;
    row-gap: var(--s2);
  }
  .entry-text {
    flex-basis: calc(100% - 110px);
  }
  .calendar {
    overflow-x: auto;
  }
  .calendar-row {
    grid-template-columns: var(--hours-width) repeat(7, minmax(84px, 1fr));
    min-width: 640px;
  }
  .time-layout.calendar-mode .week {
    grid-template-columns: 1fr;
    row-gap: var(--s4);
  }
  .editor-layout .preview {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .line-numbers {
    grid-template-columns: 1fr 1fr;
  }
  .variable-row {
    grid-template-columns: 1fr 1fr;
  }
}

.editor-surface .ProseMirror p[data-variant="lead"] { font-size: var(--type-body); color: var(--text-2); }
.editor-surface .ProseMirror p[data-variant="small"] { font-size: var(--type-label); }
.editor-surface .ProseMirror ol { padding-left: 1.4em; margin: 0 0 6px; }
.editor-surface .ProseMirror [data-shade="light"] { background: var(--light-blue); }
.editor-surface .ProseMirror [data-shade="blue"] { background: var(--weather-deep); }
.editor-surface .ProseMirror [data-shade="grey"] { background: var(--active); }
.editor-surface .ProseMirror .page-break { position: relative; height: 0; margin: var(--s4) 0; border-top: 1px dashed var(--line); }
.editor-surface .ProseMirror .page-break::after { content: 'Page break'; position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); padding: 0 var(--s2); background: var(--page); font-size: var(--type-tag); letter-spacing: var(--label-spacing); text-transform: uppercase; color: var(--text-2); }
.editor-surface .ProseMirror .page-break.ProseMirror-selectednode { border-top-color: var(--ink); }
.table-menu { align-items: center; max-width: 520px; }

.pdf-view { display: flex; flex-direction: column; gap: var(--s4); }
.pdf-page { width: 100%; height: auto; display: block; background: var(--page); box-shadow: 0 0 0 1px var(--line-soft), var(--shadow-soft); }
