/* Homepage layout aligned with the annotated visual reference. */
body.home-page-active {
  --home-reference-gap: 24px;
}

body.home-page-active:has(#home-task-list:empty) {
  overflow-y: auto;
}

body.home-page-active .workspace {
  gap: 0;
}

body.home-page-active #page-home.active {
  height: auto;
  min-height: 100vh;
}

body.home-page-active .home-banner {
  height: clamp(280px, 18vw, 320px);
  min-height: clamp(280px, 18vw, 320px);
}

body.home-page-active .home-banner-copy {
  width: min(56%, 760px);
  padding: 62px 56px 24px;
}

body.home-page-active .home-banner h1 {
  font-size: clamp(34px, 2.7vw, 48px);
}

body.home-page-active .banner-artwork,
body.home-page-active .banner-artwork-matrix {
  right: -1%;
  width: min(54%, 900px);
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

body.home-page-active .home-quick-composer,
body.home-page-active .home-workflow-selector.home-quick-composer {
  position: relative;
  z-index: 20;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  flex: 0 0 auto;
  margin: -18px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.home-page-active .home-mode-selectors {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
}

body.home-page-active .home-business-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-top: var(--home-reference-gap);
  overflow: hidden;
  border: 1px solid rgba(80, 224, 176, 0.2);
  border-radius: 22px;
  background: rgba(1, 18, 17, 0.74);
}

body.home-page-active .home-business-shortcuts button {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 276px;
  padding: 24px 26px 20px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease;
}

body.home-page-active .home-business-shortcuts button + button {
  border-left: 1px solid rgba(80, 224, 176, 0.18);
}

body.home-page-active .home-business-shortcuts button:hover,
body.home-page-active .home-business-shortcuts button:focus-visible {
  background: linear-gradient(145deg, rgba(80, 224, 176, 0.09), rgba(22, 143, 232, 0.035));
  box-shadow: inset 0 0 34px rgba(80, 224, 176, 0.04);
  outline: 0;
}

.home-business-entry-head,
.home-business-entry-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.home-business-entry-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.home-business-entry-icon {
  display: grid;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(80, 224, 176, 0.3);
  border-radius: 15px;
  color: var(--accent);
  background: rgba(3, 32, 29, 0.58);
  place-items: center;
}

.home-business-entry-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.home-business-entry-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 2px;
}

.home-business-entry-copy strong {
  color: #f1fffc;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.1;
}

.home-business-entry-copy small {
  color: #88ada8;
  font-size: 13px;
  line-height: 1.6;
}

.home-business-entry-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 24px;
}

.home-business-entry-steps i {
  padding: 5px 9px;
  border: 1px solid rgba(80, 224, 176, 0.2);
  border-radius: 7px;
  color: #a6c5c1;
  background: rgba(80, 224, 176, 0.055);
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.home-business-entry-action {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(80, 224, 176, 0.2);
  color: var(--accent);
}

.home-business-entry-action b {
  font-size: 14px;
}

.home-business-entry-action i {
  display: grid;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  color: #03211b;
  background: var(--accent);
  font-size: 18px;
  font-style: normal;
  place-items: center;
}

.home-mode-button {
  min-width: 112px;
  height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(80, 224, 176, 0.32);
  border-radius: 8px;
  color: var(--body-ink);
  background: rgba(1, 17, 16, 0.82);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.home-mode-button:hover,
.home-mode-button:focus-visible {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(80, 224, 176, 0.09);
  outline: 0;
}

.home-mode-button.is-active,
.home-mode-button[aria-pressed="true"] {
  border-color: rgba(80, 224, 176, 0.72);
  color: #03130f;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(80, 224, 176, 0.14);
}

.home-quick-input-panel {
  position: relative;
  min-height: 244px;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  background: rgba(0, 18, 17, 0.91);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: min-height 220ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-quick-input-panel:focus-within {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 20px 58px rgba(0, 0, 0, 0.15);
}

body.home-page-active #home-intent-input {
  width: 100%;
  min-height: 171px;
  height: 171px;
  padding: 72px 20px 18px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
}

body.home-page-active .home-quick-input-panel:has(> #reference-upload-stack:not([hidden])) #home-intent-input {
  padding-left: 104px;
}

body.home-page-active .home-quick-input-panel:has(#home-advanced-fields:not([hidden])):not(:has(> #reference-upload-stack:not([hidden]))) #home-intent-input {
  min-height: 115px;
  height: 115px;
  overflow: hidden;
  padding-bottom: 14px;
}

body.home-page-active #home-intent-input::placeholder {
  color: #83aaa5;
  opacity: 1;
}

.home-advanced-fields {
  padding: 18px 18px 20px;
  border-top: 0;
  background: linear-gradient(180deg, rgba(2, 34, 29, 0.50), rgba(0, 19, 18, 0.28));
}

.home-advanced-fields[hidden] {
  display: none;
}

.home-advanced-fields .workflow-structured-fields {
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(320px, 2.7fr) minmax(140px, 0.72fr) minmax(190px, 0.95fr);
  align-items: end;
  gap: 14px;
}

.home-quick-input-panel > .reference-upload-stack {
  position: absolute;
  top: 78px;
  left: 20px;
  z-index: 12;
  width: 76px;
  min-width: 76px;
  min-height: 96px;
  padding-top: 2px;
}

.home-quick-input-panel > .reference-upload-stack .reference-upload-button {
  flex-direction: column;
  gap: 5px;
}

.home-quick-input-panel > .reference-upload-stack .reference-upload-button small {
  font-size: 9px;
}

.home-advanced-fields .workflow-control-group {
  min-width: 0;
}

.home-advanced-fields .workflow-control-group:has(.select-panel.open) {
  position: relative;
  z-index: 140;
}

.home-advanced-fields .select-panel.open {
  z-index: 150;
}

.home-advanced-fields .select-panel-options {
  z-index: 160;
}

body.home-page-active .home-workflow-selector.home-quick-composer:has(.select-panel.open) {
  z-index: 220;
}

.home-advanced-fields .workflow-control-label {
  display: block;
  margin: 0 0 9px;
  color: #82a6a1;
  font-size: 12px;
  font-weight: 700;
}

.home-advanced-fields .workflow-selling-point-field .workflow-control-label::before { content: "02"; }
.home-advanced-fields .workflow-count-field .workflow-control-label::before { content: "03"; }
.home-advanced-fields .workflow-output-field .workflow-control-label::before { content: "04"; }

.home-advanced-fields select,
.home-advanced-fields .select-panel-title,
.home-advanced-fields .workflow-output-label {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(80, 224, 176, 0.22);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(0, 13, 13, 0.72);
}

.home-advanced-fields .select-panel-title {
  padding: 0 38px 0 14px;
  text-align: left;
}

.home-advanced-fields .workflow-output-label {
  display: flex;
  align-items: center;
  padding: 0 14px 0 40px;
  position: relative;
}

.home-advanced-fields .workflow-output-label::before {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #001c17;
  background: rgba(80, 224, 176, 0.34);
  content: "▶";
  font-size: 8px;
}

.home-advanced-fields .home-final-condition {
  margin: 13px 2px 0;
  color: #88b0aa;
  font-size: 12px;
}

.home-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 20px;
  border-top: 0;
}

.home-composer-footer-left {
  display: flex;
  align-items: center;
}

.home-composer-footer-left {
  gap: 18px;
}

#advanced-toggle.home-advanced-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--body-ink);
  background: transparent;
  cursor: pointer;
}

#advanced-toggle.home-advanced-entry:hover,
#advanced-toggle.home-advanced-entry[aria-expanded="true"] {
  border-color: rgba(80, 224, 176, 0.26);
  color: var(--accent);
  background: rgba(80, 224, 176, 0.06);
}

.home-composer-footer .simple-submit-wrap,
.home-composer-footer .simple-submit-fab {
  width: 50px;
  height: 50px;
  min-width: 50px;
}

.home-composer-footer .simple-submit-fab {
  border-color: rgba(80, 224, 176, 0.55);
  background: linear-gradient(145deg, #4ce1ba, #19a9d0);
}

body.home-page-active .home-layout:not([hidden]) {
  display: block;
  flex: 0 0 auto;
  margin-top: 18px;
}

body.home-page-active .home-layout[hidden] {
  display: none;
}

@media (max-width: 1180px) {
  .home-advanced-fields .workflow-structured-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.home-page-active .home-banner {
    height: 300px;
    min-height: 300px;
  }

  body.home-page-active .home-banner-copy {
    padding: 26px 18px 0;
  }

  body.home-page-active .banner-artwork,
  body.home-page-active .banner-artwork-matrix {
    width: 100%;
    height: 88%;
    object-position: right center;
  }

  body.home-page-active .home-quick-composer,
  body.home-page-active .home-workflow-selector.home-quick-composer {
    margin-top: -12px;
  }

  .home-mode-selectors {
    right: 16px;
    gap: 10px;
  }

  .home-mode-button {
    min-width: 0;
    flex: 1 1 0;
  }

  body.home-page-active .home-business-shortcuts {
    grid-template-columns: 1fr;
  }

  body.home-page-active .home-business-shortcuts button + button {
    border-top: 1px solid rgba(80, 224, 176, 0.18);
    border-left: 0;
  }

  .home-advanced-fields .workflow-structured-fields {
    grid-template-columns: 1fr;
  }

  .home-composer-footer {
    padding-inline: 14px;
  }

  .home-composer-footer-left {
    gap: 8px;
  }
}
