
:root {
  --home-bg: #101113;
  --home-panel: #191b1e;
  --home-text: #eceef1;
  --home-muted: #a1a7af;
  --home-line: #363a40;
  --home-accent: #7c84e8;
  --project-rail-height: 52px;
}
html:has(body.home) {
  --z: 1;
}
body.home {
  background: var(--home-bg);
  color: var(--home-text);
  font-size: var(--ds-size-16);
  line-height: var(--ds-leading-body);
}

body .app {
  box-sizing: border-box;
  height: calc((100dvh - var(--project-rail-height) - var(--ds-shell-gap)) / var(--z));
  margin: 0 calc(var(--ds-shell-gap) / var(--z)) calc(var(--ds-shell-gap) / var(--z));
  border: 1px solid var(--ds-border);
  border-radius: calc(var(--ds-radius-panel) / var(--z));
  overflow: clip;
}
body.home #home {
  --home-bg: var(--ds-content);
  box-sizing: border-box;
  margin: 0 var(--ds-shell-gap) var(--ds-shell-gap);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-content);
  height: calc(100dvh - var(--project-rail-height) - var(--ds-shell-gap));
  overflow-y: auto;
}

#home button:where(:not(.ds-tabs__tab, .ds-button)), #ptabs button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  background: transparent;
  text-align: left;
}

#home button:focus-visible, #ptabs button:focus-visible, #home textarea:focus-visible {
  outline: none;
}
#home ::selection {
  background: #454b87;
  color: #fff;
}
#home input, #home textarea {
  caret-color: var(--home-accent);
}
.home-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

#ptabs {
  zoom: calc(1 / var(--z));
  height: var(--project-rail-height);
  gap: var(--ds-space-1-5);
  background: var(--ds-bg);
  color: var(--ds-text-muted);
  padding: 0 var(--ds-shell-gap);   
  display: flex;
  align-items: center;
  font-size: var(--ds-size-14);
  line-height: var(--ds-leading-body);
}
#ptabs .home-tab, .home-project-tab {
  display: flex;
  align-items: center;
  height: var(--ds-tab-height);
  border-radius: var(--ds-tab-radius);
  flex: none;
  transition: background-color var(--ds-duration-hover) ease, color var(--ds-duration-hover) ease;
}

#ptabs .home-tab {
  gap: var(--ds-nav-item-gap);
  padding: 0 var(--ds-space-2);
}

.home-tab-icon {
  box-sizing: border-box;
  width: var(--ds-avatar-sm-size);
  height: var(--ds-avatar-sm-size);
  padding: calc((var(--ds-avatar-sm-size) - var(--ds-icon-sm)) / 2);
  flex: none;
}
@media (hover: hover) and (pointer: fine) {
  #ptabs .home-tab:hover, .home-project-tab:hover {
    background: var(--ds-nav-item-hover-bg);
    color: var(--ds-text-strong);
  }
}
#ptabs .home-tab:focus-visible, .home-project-tab:has(> button[data-proj]:focus-visible) {
  background: var(--ds-nav-item-hover-bg);
  color: var(--ds-text-strong);
}
#ptabs .home-tab[aria-current], #ptabs .home-project-tab[data-active] {
  background: var(--ds-nav-item-active-bg);
  box-shadow: var(--ds-shadow-card);
  color: var(--ds-text);
}
#ptabs [data-active] > .home-close-tab {
  color: var(--ds-text-muted);
}

.home-open-tabs {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1-5);
  overflow-x: auto;
  min-width: 0;
  margin-inline: -5px;
  padding: var(--ds-space-1) 2px;
  scrollbar-width: none;
}
.home-open-tabs::-webkit-scrollbar {
  display: none;
}
.home-project-tab {
  padding-right: var(--ds-space-2);
}
.home-project-tab > button[data-proj] {
  display: flex;
  gap: var(--ds-nav-item-gap);
  align-items: center;
  height: 100%;
  padding: 0 0 0 var(--ds-space-2);
  border-radius: inherit;
  font-weight: var(--ds-weight-medium);
}
.home-project-tab .home-tab-name {
  white-space: nowrap;
}
.home-avatar {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #7982dc;
  color: #151728;
  font-size: var(--ds-size-20);
  font-weight: var(--ds-weight-semibold);
  letter-spacing: var(--ds-tracking-tight);
  flex: none;
}
#ptabs .home-avatar {
  width: var(--ds-avatar-sm-size);
  height: var(--ds-avatar-sm-size);
  font-size: var(--ds-size-11);
  letter-spacing: var(--ds-tracking-normal);
  border-radius: var(--ds-avatar-sm-radius);
}
#ptabs .home-close-tab, #ptabs #ptab-add {
  display: grid;
  place-items: center;
  height: var(--ds-control-sm);
  width: var(--ds-control-sm);
  flex: none;
  border-radius: var(--ds-radius-md);
  color: var(--ds-text-faint);
  transition: background-color var(--ds-duration-hover) ease, color var(--ds-duration-hover) ease;
}

#ptabs .home-close-tab {
  overflow: hidden;
  width: var(--ds-avatar-sm-size);
  height: var(--ds-avatar-sm-size);
  margin: 0 0 0 var(--ds-nav-item-gap);
  border-radius: var(--ds-avatar-sm-radius);
  transition: background-color var(--ds-duration-hover) ease, color var(--ds-duration-hover) ease,
    opacity var(--ds-duration-popover) ease, width var(--ds-duration-popover) var(--ds-ease-out),
    margin var(--ds-duration-popover) var(--ds-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  
  #ptabs .home-project-tab:not([data-active], :hover, :focus-within) .home-close-tab {
    width: 0;
    margin-left: 0;
    opacity: 0;
    pointer-events: none;
  }
}


#ptabs #ptab-add {
  position: relative;
  background: none;
}
#ptab-add::before {
  content: "";
  position: absolute;
  inset: calc((var(--ds-control-sm) - var(--ds-avatar-sm-size)) / 2);
  border-radius: var(--ds-avatar-sm-radius);
  transition: background-color var(--ds-duration-hover) ease;
}
#ptab-add > .home-icon {
  position: relative;
  width: var(--ds-icon-sm);
  height: var(--ds-icon-sm);
}
@media (hover: hover) and (pointer: fine) {
  #ptabs .home-close-tab:hover, #ptab-add:hover::before {
    background: var(--ds-hover-bg);
  }
  #ptabs .home-close-tab:hover, #ptab-add:hover {
    color: var(--ds-text-strong);
  }
}
#ptabs .home-close-tab:focus-visible, #ptab-add:focus-visible::before {
  background: var(--ds-hover-bg);
}
#ptabs .home-close-tab:focus-visible, #ptab-add:focus-visible {
  color: var(--ds-text-strong);
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  height: var(--project-top-height);
  padding: 0 var(--ds-space-5);
  border-bottom: 1px solid var(--ds-border-subtle);
}
.home-header h1 {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  min-width: 0;
  margin: 0;
  font-size: var(--ds-size-14);
  line-height: var(--ds-leading-body);
  font-weight: var(--ds-weight-medium);
  letter-spacing: var(--ds-tracking-normal);
  color: var(--ds-text-strong);
}
.home-crumb-page {
  display: flex;
  align-items: center;
  gap: var(--ds-nav-item-gap);
  min-height: var(--ds-nav-item-height);
  margin-inline: calc(-1 * var(--ds-space-2-5));
  padding: var(--ds-nav-item-padding);
  color: var(--ds-text-muted);
  white-space: nowrap;
}
.home-crumb-page > .home-icon {
  width: var(--ds-icon-nav);
  height: var(--ds-icon-nav);
  color: var(--ds-text-faint);
}
.home-crumb-sep {
  color: var(--ds-text-faint);
  font-weight: var(--ds-weight-regular);
}
.home-crumb-here {
  white-space: nowrap;
}
.home-wrap {
  max-width: 1320px;
  padding: 48px 40px;
  margin: 0 auto;
}
.home-intro {
  margin-bottom: 36px;
}
.home-intro h2 {
  font-size: var(--ds-size-28);
  line-height: var(--ds-leading-display);
  font-weight: var(--ds-weight-semibold);
  letter-spacing: var(--ds-tracking-tight);
}
.home-intro p {
  margin-top: 8px;
  color: var(--home-muted);
}

.home-toolbar {
  justify-content: space-between;
  margin-bottom: 28px;
}
.home-project-footer {
  font-variant-numeric: tabular-nums;
}
.home-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 272px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  color: var(--home-muted);
  background: #17191c;
}
.home-search input {
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  background: none;
  color: var(--home-text);
  font: inherit;
  font-size: var(--ds-size-14);
}
.home-search input::placeholder {
  color: var(--home-muted);
}
.home-search kbd {
  font: inherit;
  font-size: var(--ds-size-14);
  white-space: nowrap;
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

#home .home-project {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 276px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--ds-card-radius);
  background: var(--home-panel);
  transition: box-shadow var(--ds-duration-hover) ease, background-color var(--ds-duration-hover) ease,
    scale var(--ds-duration-press) var(--ds-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  #home .home-project:hover {
    box-shadow: var(--ds-border-strong) 0 0 0 1px, var(--ds-shadow-button);
    background-image: var(--ds-hover-wash);
  }
}
#home .home-project:active {
  background: #252932;
}
@media (prefers-reduced-motion: no-preference) {
  #home .home-project:active {
    scale: var(--ds-press-scale);
  }
}
.home-project-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: var(--ds-space-5) var(--ds-space-5) var(--ds-space-4-5);
  text-align: left;
}
.home-project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ds-space-4);
  width: 100%;
  margin-bottom: var(--ds-space-4-5);
}

.home-open-link {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-1-5);
  color: var(--ds-text);
  transition: color var(--ds-duration-hover) ease;
}
.home-open-link > svg {
  width: var(--ds-icon-xs);
  height: var(--ds-icon-xs);
}
#home .home-project:focus-visible .home-open-link {
  color: var(--ds-text-strong);
}
@media (hover: hover) and (pointer: fine) {
  #home .home-project:hover .home-open-link {
    color: var(--ds-text-strong);
  }
}
.home-project-name {
  font-size: var(--ds-size-20);
  line-height: var(--ds-leading-heading);
  font-weight: var(--ds-weight-semibold);
  letter-spacing: var(--ds-tracking-tight);
  overflow-wrap: anywhere;
}
.home-project-repos {
  margin-top: var(--ds-space-1);
  font-size: var(--ds-size-16);
  line-height: var(--ds-leading-body);
  color: var(--home-muted);
  overflow-wrap: anywhere;
}
.home-project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-5);
  border-top: 1px solid var(--ds-border);
  font-size: var(--ds-size-14);
  line-height: var(--ds-leading-body);
  color: var(--home-muted);
}

#home .home-note.ds-alert {
  width: fit-content;
  max-width: 100%;
  margin-top: var(--ds-space-5);
}

.home-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--ds-space-6) var(--ds-space-5);
  border-radius: var(--ds-card-radius);
  background: var(--ds-card-bg);
  box-shadow: var(--ds-card-shadow);
  text-align: center;
}
.home-empty h3 {
  margin: var(--ds-space-3) 0 0;
  font-size: var(--ds-size-18);
  line-height: var(--ds-leading-heading);
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-strong);
}
.home-empty p {
  max-width: 48ch;
  margin: var(--ds-space-1-5) 0 0;
  font-size: var(--ds-size-14);
  line-height: var(--ds-leading-body);
  color: var(--ds-text-muted);
}
.home-empty .ds-button {
  margin-top: var(--ds-space-4);
}
.home-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .home-header {
    padding: 0 var(--ds-space-4);
  }
  .home-header :is(.home-crumb-sep, .home-crumb-here) {
    display: none;
  }
  .home-wrap {
    padding: 28px 16px;
  }
  .home-intro {
    margin-bottom: 24px;
  }
  .home-intro h2 {
    font-size: var(--ds-size-24);
    line-height: var(--ds-leading-title);
  letter-spacing: var(--ds-tracking-tight); }
  
  #home .home-toolbar {
    flex-direction: column-reverse;
    align-items: flex-start;
    margin-bottom: 24px;
  }
  .home-search {
    width: 100%;
    height: 44px;
    margin: 0;
  }
  .home-search input {
    font-size: var(--ds-size-16);
  }
  .home-grid {
    gap: 16px;
  }
  #home .home-project {
    min-height: 264px;
  }
  .home-project-main {
    padding: var(--ds-space-4);
  }
  .home-project-footer {
    padding-inline: var(--ds-space-4);
  }
}
@media (prefers-reduced-motion: reduce) {
  #home .home-project {
    transition: none;
  }
}
