.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 14px 14px;
}

.home-side-actions,
.home-navigation,
.home-side-end {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
}

.home-side-end { margin-top: auto; }
.home-navigation { gap: 3px; }

.home-sidebar button,
.home-hero-actions button,
.home-text-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius);
  padding: 0 11px;
  text-align: left;
  white-space: nowrap;
}

.home-sidebar button > svg,
.home-hero-actions button > svg,
.home-demo-type > svg {
  flex: 0 0 auto;
}

.home-button-primary,
.home-button-secondary { font-weight: 600; }

.home-button-primary {
  border: 1px solid transparent;
  background: var(--accent-fill);
  color: #fff;
}

.home-button-primary:hover { background: var(--accent-hover); }

.home-button-secondary {
  border: 1px solid var(--stroke-strong);
  background: var(--panel-2);
}

.home-button-secondary:hover { background: var(--hover); }

.home-navigation button,
.home-side-end button { color: var(--muted); }

.home-navigation button:hover,
.home-side-end button:hover { background: var(--hover); color: var(--text); }

.home-navigation button[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.home-local-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  border-top: 1px solid var(--stroke);
  padding: 12px 9px 1px;
  color: var(--subtle);
  font-size: .85rem;
  line-height: 1.25;
}

.home-local-status > svg { flex: 0 0 auto; }

.home-main {
  padding: clamp(22px, 3.4vw, 48px);
  scrollbar-gutter: stable;
}

.home-content {
  width: min(100%, 1220px);
  margin: 0 auto;
}

.home-hero {
  display: grid;
  min-height: 295px;
  grid-template-columns: minmax(250px, .9fr) minmax(250px, 1.1fr);
  align-items: center;
  gap: clamp(23px, 4vw, 55px);
  border: 1px solid var(--stroke);
  border-radius: 13px;
  padding: clamp(22px, 3vw, 39px);
  background: var(--panel);
}

.home-hero:not(:has(.home-demo)) { grid-template-columns: minmax(0, 1fr); }

.home-main .home-hero h1 {
  max-width: 11em;
  margin: 0;
  font-size: clamp(2.25rem, 4.1vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1.02;
}

.home-hero-copy p {
  max-width: 29ch;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-hero-actions button { min-height: 38px; }

.home-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--stroke-strong);
  border-radius: 9px;
  background: var(--field);
  text-align: left;
}

.home-demo:hover {
  border-color: var(--accent);
  background: var(--hover);
}

.home-demo-visual {
  position: relative;
  display: grid;
  min-height: 130px;
  aspect-ratio: 2.1;
  place-items: center;
  overflow: hidden;
  background-color: var(--panel-2);
  background-image: conic-gradient(var(--hover) 25%, transparent 0 50%, var(--hover) 0 75%, transparent 0);
  background-size: 22px 22px;
}

.home-demo-visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-demo-info { border-top: 1px solid var(--stroke); padding: 11px 14px 12px; }

.home-demo-type {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: .88rem;
}

.home-demo-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 9px;
}

.home-demo-caption > strong { font-size: 1.08rem; }
.home-demo-caption > span { color: var(--subtle); font-size: .85rem; white-space: nowrap; }

.home-projects,
.home-quick-models { margin-top: 33px; }

.home-content > .home-projects:first-child { margin-top: 0; }
.home-page-heading { margin: 0 0 23px; }
.home-page-heading h1 { margin: 0; }
.home-page-heading p { margin: 8px 0 0; color: var(--muted); }

.home-section-heading {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-section-heading :is(h1, h2) { margin: 0; }
.home-section-heading h2 { font-size: 1.35rem; }

.home-text-button { min-height: 30px; color: var(--accent); }
.home-text-button:hover { background: var(--accent-soft); }

.home-view-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  padding: 2px;
  background: var(--panel);
}

.home-view-switch button {
  display: grid;
  width: 32px;
  height: 27px;
  place-items: center;
  border-radius: 4px;
  color: var(--muted);
}

.home-view-switch button:hover { background: var(--hover); color: var(--text); }
.home-view-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

.home-load-message,
.home-empty {
  min-height: 130px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--panel);
}

.home-load-message {
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
}

.home-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 15px;
  text-align: center;
}

.home-empty strong { font-weight: 650; }
.home-empty p { margin: 0; color: var(--muted); font-size: .94rem; }

.home-empty-icon,
.home-model-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.home-empty-icon { margin-bottom: 5px; }

.home-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 9px;
}

.home-model {
  display: flex;
  min-height: 65px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--panel);
  text-align: left;
}

.home-model:hover { border-color: var(--accent); background: var(--hover); }
.home-model strong, .home-model small { display: block; }
.home-model strong { font-size: .99rem; font-weight: 620; }
.home-model small { margin-top: 2px; color: var(--subtle); font-size: .86rem; }

.home-project-list {
  display: grid;
  gap: 7px;
  padding-bottom: 40px;
}

.home-project-list-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 11px; }

.home-project {
  position: relative;
  min-width: 0;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--panel);
}

.home-project:focus-within,
.home-project:hover { border-color: var(--stroke-strong); }

.home-project-target {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  text-align: left;
}

button.home-project-target:hover { background: var(--hover); }

.home-project-thumbnail {
  display: grid;
  width: 42px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--field);
  background-image: conic-gradient(var(--panel-2) 25%, transparent 0 50%, var(--panel-2) 0 75%, transparent 0);
  background-size: 12px 12px;
  color: var(--muted);
}

.home-project-thumbnail img { width: 100%; height: 100%; object-fit: contain; }

.home-project-label { display: block; min-width: 0; }
.home-project-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-project-label small { display: block; margin-top: 3px; color: var(--subtle); font-size: .8rem; }

.home-project-meta,
.home-project-table-head {
  min-width: 0;
  color: var(--muted);
  font-size: .85rem;
}

.home-project-tools { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.home-project-favorite { color: var(--accent); }
.home-project-favorite svg { fill: var(--accent-soft); }

.home-project-menu { position: relative; }
.home-project-menu summary {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.home-project-menu summary::-webkit-details-marker { display: none; }
.home-project-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.home-project-menu summary:hover,
.home-project-menu[open] summary { border-color: var(--stroke); background: var(--hover); color: var(--text); }

.home-project-actions {
  position: absolute;
  z-index: 2;
  top: calc(100% + 3px);
  right: 0;
  min-width: 196px;
  border: 1px solid var(--stroke-strong);
  border-radius: 7px;
  padding: 3px;
  background: var(--panel-2);
  box-shadow: 0 8px 18px #0003;
}

.home-project-actions button {
  display: flex;
  width: 100%;
  min-height: 33px;
  align-items: center;
  gap: 7px;
  border-radius: 5px;
  padding: 4px 7px;
  text-align: left;
  white-space: nowrap;
}

.home-project-actions button:hover { background: var(--hover); }
.home-project-actions .home-danger { color: var(--negative); }

.home-project-list-grid .home-project-target {
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.home-project-list-grid .home-project-thumbnail {
  width: 100%;
  height: auto;
  aspect-ratio: 1.8;
  border-radius: 7px 7px 0 0;
}

.home-project-list-grid .home-project-label { padding: 9px 37px 8px 10px; }
.home-project-list-grid .home-project-meta { display: grid; gap: 2px; padding: 0 10px 9px; }
.home-project-list-grid .home-project-tools { position: absolute; right: 6px; bottom: 10px; }
.home-project-list-grid .home-project-location { display: none; }

.home-project-list-list .home-project,
.home-project-list-details .home-project,
.home-project-table-head {
  display: grid;
  min-height: 53px;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}

.home-project-list-list .home-project-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 11px; }
.home-project-list-list .home-project-location { display: none; }

.home-project-list-details .home-project,
.home-project-table-head { grid-template-columns: minmax(125px, 1.3fr) .5fr minmax(87px, .82fr) minmax(72px, .63fr) 52px; }
.home-project-list-details .home-project-meta { display: contents; }
.home-project-table-head { min-height: 26px; font-weight: 600; }

@media (max-width: 1000px) {
  .home-hero { min-height: 266px; grid-template-columns: minmax(185px, .8fr) minmax(200px, 1.2fr); gap: 20px; }
  .home-hero-actions button { padding-inline: 9px; }
}

@media (max-width: 800px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .home-hero-copy p { max-width: 42ch; }
  .home-demo-visual { aspect-ratio: 2.4; }
  .home-project-list-details .home-project,
  .home-project-table-head { grid-template-columns: minmax(110px, 1fr) .46fr minmax(74px, .62fr) 36px; }
  .home-project-list-details .home-project-location,
  .home-project-table-head > :nth-child(4) { display: none; }
}

@media (max-width: 650px) {
  .home-sidebar {
    flex-direction: row;
    align-items: center;
    gap: 5px;
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
    padding: 7px;
  }
  .home-sidebar button { min-height: 32px; padding: 0 7px; font-size: .88rem; }
  .home-navigation, .home-side-actions, .home-side-end { display: flex; gap: 3px; }
  .home-local-status { display: none; }
  .home-side-end { margin: 0 0 0 auto; }
  .home-side-actions button,
  .home-side-end button { max-width: 34px; overflow: hidden; gap: 20px; }
  .home-main { padding: 15px; scrollbar-gutter: auto; }
  .home-projects, .home-quick-models { margin-top: 24px; }
  .home-section-heading { gap: 6px; }
  .home-section-heading h1 { font-size: 1.6rem; }
  .home-section-heading h2 { font-size: 1.2rem; }
  .home-view-switch button { width: 28px; }
  .home-hero { gap: 15px; padding: 17px; }
  .home-hero-copy p { margin-block: 9px 14px; }
  .home-project-list-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 400px) {
  .home-project-list-list .home-project { grid-template-columns: minmax(135px, 1fr) minmax(57px, .55fr) 30px; }
  .home-project-list-details .home-project,
  .home-project-table-head { grid-template-columns: minmax(110px, 1fr) minmax(72px, .56fr) 30px; }
  .home-project-list-details .home-project-size,
  .home-project-table-head > :nth-child(2),
  .home-project-favorite { display: none; }
}
