/* Configurable authenticated-home Hero themes. The existing marquee component
   and application font stack intentionally remain unchanged across themes. */
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed {
  --hh-bg-color: #ffffff;
  --hh-overlay: linear-gradient(120deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 255, 0.97));
  --hh-border: #d8e2ed;
  --hh-heading: #173f72;
  --hh-text: #66758a;
  --hh-muted: #7b8b9f;
  --hh-accent: #173f72;
  --hh-accent-2: #0f766e;
  --hh-panel: #ffffff;
  --hh-panel-border: #d8e3ee;
  --hh-panel-text: #213b5a;
  --hh-panel-muted: #7a899c;
  --hh-soft: #f7fafc;
  --hh-soft-border: #e1e8f0;
  --hh-primary: #173f72;
  --hh-primary-text: #ffffff;
  --hh-secondary: #ffffff;
  --hh-secondary-text: #40546b;
  --hh-radius: 12px;
  --hh-radius-small: 7px;
  --hh-shadow: 0 18px 44px rgba(23, 63, 114, 0.1);
  --hh-title-size: 40px;
  --hh-title-weight: 900;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 28px 32px 26px;
  overflow: hidden;
  border: 1px solid var(--hh-border);
  border-radius: var(--hh-radius);
  color: var(--hh-text);
  background-color: var(--hh-bg-color);
  background-image: var(--hh-overlay), var(--home-hero-image, none);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  box-shadow: var(--hh-shadow);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed::before {
  content: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  opacity: 0.16;
  pointer-events: none;
  background:
    linear-gradient(var(--hh-accent), var(--hh-accent)) left top / 38px 1px no-repeat,
    linear-gradient(var(--hh-accent), var(--hh-accent)) left top / 1px 38px no-repeat,
    linear-gradient(var(--hh-accent), var(--hh-accent)) right bottom / 38px 1px no-repeat,
    linear-gradient(var(--hh-accent), var(--hh-accent)) right bottom / 1px 38px no-repeat;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-accent {
  width: 4px;
  background: linear-gradient(180deg, var(--hh-accent), var(--hh-accent-2));
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-inner {
  gap: 22px 28px;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-title {
  margin: 15px 0 0;
  overflow: visible;
  color: var(--hh-heading);
  font-size: var(--hh-title-size);
  line-height: 1.1;
  letter-spacing: 0;
  text-overflow: clip;
  text-shadow: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-title::after {
  width: 76px;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hh-accent), var(--hh-accent-2));
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-sub {
  color: var(--hh-text);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow {
  min-height: 38px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--hh-soft-border);
  border-radius: var(--hh-radius-small);
  color: var(--hh-heading);
  background: var(--hh-soft);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow::before,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow::after {
  content: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow-mark {
  border-color: var(--hh-soft-border);
  color: var(--hh-accent);
  background: var(--hh-panel);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow-copy b {
  color: var(--hh-heading);
  text-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow-copy small,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow-index,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-poster-code {
  color: var(--hh-muted);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-eyebrow-index {
  border-left-color: var(--hh-soft-border);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-poster-code {
  border-color: var(--hh-soft-border);
  background: var(--hh-soft);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-poster-code i {
  background: var(--hh-accent-2);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-meta .badge {
  border-color: var(--hh-soft-border);
  color: var(--hh-panel-text);
  background: var(--hh-soft);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-meta .badge svg {
  color: var(--hh-accent);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-capabilities {
  border-top-color: var(--hh-soft-border);
  border-bottom-color: var(--hh-soft-border);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-capabilities span {
  border-right-color: var(--hh-soft-border);
  color: var(--hh-panel-text);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-capabilities svg {
  color: var(--hh-accent-2);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-console {
  border-color: var(--hh-panel-border);
  border-radius: var(--hh-radius);
  background: var(--hh-panel);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-console::before {
  background: linear-gradient(90deg, var(--hh-accent), var(--hh-accent-2));
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-avatar {
  border-color: var(--hh-panel-border);
  color: var(--hh-primary-text);
  background: var(--hh-primary);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-avatar::after {
  border-color: var(--hh-bg-color);
  background: var(--hh-accent-2);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-identity small,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-days > span,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-progress-head,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-progress > small {
  color: var(--hh-panel-muted);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-identity b,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-metrics b,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-metrics > div:nth-child(2) b,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-metrics > div:nth-child(3) b {
  color: var(--hh-panel-text);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-status {
  border-color: color-mix(in srgb, var(--hh-accent-2) 30%, transparent);
  color: var(--hh-accent-2);
  background: color-mix(in srgb, var(--hh-accent-2) 9%, transparent);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-status i {
  background: var(--hh-accent-2);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-focus,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-metrics {
  border-color: var(--hh-soft-border);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-metrics {
  background: color-mix(in srgb, var(--hh-soft) 76%, transparent);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-days b {
  color: var(--hh-accent);
  text-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-days small,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-progress-head em,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-foot em {
  color: var(--hh-accent-2);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-progress-track {
  background: color-mix(in srgb, var(--hh-panel-muted) 18%, transparent);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-progress-track i {
  background: linear-gradient(90deg, var(--hh-accent), var(--hh-accent-2));
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-foot,
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-metrics span {
  color: var(--hh-panel-muted);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-console-foot svg {
  color: var(--hh-accent-2);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-actions .btn {
  min-height: 48px;
  border-radius: var(--hh-radius-small);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero .btn-white {
  border-color: var(--hh-primary);
  color: var(--hh-primary-text);
  background: var(--hh-primary);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero .btn-white:hover {
  filter: brightness(0.94);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero .btn-glass {
  border-color: var(--hh-soft-border);
  color: var(--hh-secondary-text);
  background: var(--hh-secondary);
  box-shadow: none;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-actions .btn-white svg {
  color: var(--hh-primary-text);
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-actions .btn-glass svg {
  color: var(--hh-accent);
}

/* Warm editorial type: restrained, rule-led, no gradients or glass. */
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="editorial"] {
  --hh-bg-color: #f5f4f0;
  --hh-overlay: linear-gradient(112deg, rgba(245, 244, 240, 0.99) 0 56%, rgba(245, 244, 240, 0.86) 100%);
  --hh-border: #b9b8b3;
  --hh-heading: #17191c;
  --hh-text: #5d6266;
  --hh-muted: #777b7e;
  --hh-accent: #c65236;
  --hh-accent-2: #c65236;
  --hh-panel: #ffffff;
  --hh-panel-border: #c8c6c0;
  --hh-panel-text: #282b2e;
  --hh-panel-muted: #6e7377;
  --hh-soft: #efeee9;
  --hh-soft-border: #c8c6c0;
  --hh-primary: #17191c;
  --hh-primary-text: #ffffff;
  --hh-secondary: #f5f4f0;
  --hh-secondary-text: #34383c;
  --hh-radius: 2px;
  --hh-radius-small: 2px;
  --hh-shadow: none;
  --hh-title-size: 50px;
  --hh-title-weight: 950;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="editorial"]::after {
  display: none;
}

/* Magazine desk: dark outer shell and a dense, structured information rail. */
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="journal"] {
  --hh-bg-color: #1e2723;
  --hh-overlay: linear-gradient(115deg, rgba(30, 39, 35, 0.99), rgba(35, 47, 41, 0.96));
  --hh-border: #35443d;
  --hh-heading: #f7f4ec;
  --hh-text: #b9c3bd;
  --hh-muted: #93a09a;
  --hh-accent: #d66a4d;
  --hh-accent-2: #7bb59e;
  --hh-panel: rgba(255, 255, 255, 0.035);
  --hh-panel-border: #46574f;
  --hh-panel-text: #f0f3ef;
  --hh-panel-muted: #9ba8a1;
  --hh-soft: rgba(255, 255, 255, 0.045);
  --hh-soft-border: #46574f;
  --hh-primary: #d66a4d;
  --hh-primary-text: #fffaf5;
  --hh-secondary: rgba(255, 255, 255, 0.035);
  --hh-secondary-text: #d9e0db;
  --hh-radius: 2px;
  --hh-radius-small: 2px;
  --hh-shadow: none;
  --hh-title-size: 50px;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="journal"] .home-hero-console {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 2px solid var(--hh-accent);
  padding-left: 22px;
}

/* Midnight creation cockpit: navy field, gold membership signal, cyan action. */
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="midnight"] {
  --hh-bg-color: #081427;
  --hh-overlay:
    radial-gradient(circle at 84% 18%, rgba(47, 143, 255, 0.18), transparent 30%),
    linear-gradient(112deg, rgba(8, 20, 39, 0.99), rgba(16, 40, 68, 0.96));
  --hh-border: #27405f;
  --hh-heading: #f5f8fd;
  --hh-text: #a9bdd3;
  --hh-muted: #8197b3;
  --hh-accent: #f1c45f;
  --hh-accent-2: #61c9ff;
  --hh-panel: rgba(4, 15, 30, 0.72);
  --hh-panel-border: rgba(126, 177, 229, 0.28);
  --hh-panel-text: #edf5ff;
  --hh-panel-muted: #8299b5;
  --hh-soft: rgba(255, 255, 255, 0.045);
  --hh-soft-border: rgba(136, 177, 221, 0.22);
  --hh-primary: #61c9ff;
  --hh-primary-text: #061326;
  --hh-secondary: rgba(255, 255, 255, 0.045);
  --hh-secondary-text: #d4e2f1;
  --hh-radius: 14px;
  --hh-radius-small: 7px;
  --hh-shadow: 0 24px 58px rgba(4, 13, 28, 0.32);
  --hh-title-size: 48px;
}

/* Warm editorial desk: image-led, light surface, black and ember buttons. */
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="desk"] {
  --hh-bg-color: #f5f4f0;
  --hh-overlay: linear-gradient(108deg, rgba(245, 244, 240, 0.99) 0 52%, rgba(245, 244, 240, 0.68) 100%);
  --hh-border: #c4c3bd;
  --hh-heading: #17191c;
  --hh-text: #5d6266;
  --hh-muted: #777b7e;
  --hh-accent: #c65236;
  --hh-accent-2: #ab442c;
  --hh-panel:
    linear-gradient(180deg, rgba(17, 20, 23, 0.08), rgba(17, 20, 23, 0.86)),
    url("/assets/home-hero-writing.webp") center / cover no-repeat;
  --hh-panel-border: rgba(255, 255, 255, 0.28);
  --hh-panel-text: #ffffff;
  --hh-panel-muted: rgba(255, 255, 255, 0.72);
  --hh-soft: #efeee9;
  --hh-soft-border: #c8c6c0;
  --hh-primary: #17191c;
  --hh-primary-text: #ffffff;
  --hh-secondary: #f5f4f0;
  --hh-secondary-text: #34383c;
  --hh-radius: 2px;
  --hh-radius-small: 2px;
  --hh-shadow: none;
  --hh-title-size: 49px;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="desk"]::after {
  display: none;
}

/* Content control: compact dark console with blue primary controls. */
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="control"] {
  --hh-bg-color: #091321;
  --hh-overlay:
    linear-gradient(90deg, rgba(9, 19, 33, 0.99) 0 62%, rgba(12, 31, 54, 0.9) 100%);
  --hh-border: #233c5d;
  --hh-heading: #ffffff;
  --hh-text: #a9bbd1;
  --hh-muted: #8399b4;
  --hh-accent: #5eb4ff;
  --hh-accent-2: #71dcc8;
  --hh-panel: linear-gradient(145deg, rgba(20, 53, 88, 0.9), rgba(10, 28, 49, 0.96));
  --hh-panel-border: rgba(126, 175, 232, 0.34);
  --hh-panel-text: #f3f7fc;
  --hh-panel-muted: #8fa6c2;
  --hh-soft: rgba(255, 255, 255, 0.045);
  --hh-soft-border: rgba(126, 175, 232, 0.24);
  --hh-primary: #5eb4ff;
  --hh-primary-text: #061326;
  --hh-secondary: rgba(255, 255, 255, 0.04);
  --hh-secondary-text: #d4e0ef;
  --hh-radius: 5px;
  --hh-radius-small: 3px;
  --hh-shadow: 0 22px 52px rgba(4, 13, 27, 0.28);
  --hh-title-size: 49px;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="control"] .home-hero-console {
  border-top: 3px solid var(--hh-accent);
}

/* Calm studio: sage surface, forest actions, measured separators. */
.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="studio"] {
  --hh-bg-color: #f3f4ee;
  --hh-overlay: linear-gradient(112deg, rgba(243, 244, 238, 0.99) 0 58%, rgba(229, 235, 224, 0.93) 100%);
  --hh-border: #b7c1b4;
  --hh-heading: #17372f;
  --hh-text: #5f6f67;
  --hh-muted: #75827b;
  --hh-accent: #c6852e;
  --hh-accent-2: #2b6758;
  --hh-panel: rgba(255, 255, 255, 0.42);
  --hh-panel-border: #b7c1b4;
  --hh-panel-text: #234238;
  --hh-panel-muted: #75827b;
  --hh-soft: rgba(255, 255, 255, 0.34);
  --hh-soft-border: #b7c1b4;
  --hh-primary: #214f43;
  --hh-primary-text: #ffffff;
  --hh-secondary: rgba(255, 255, 255, 0.36);
  --hh-secondary-text: #40564d;
  --hh-radius: 6px;
  --hh-radius-small: 5px;
  --hh-shadow: 0 18px 40px rgba(40, 70, 58, 0.12);
  --hh-title-size: 49px;
}

.user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="studio"] .home-hero-console {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: inset 0 1px 0 var(--hh-panel-border), inset 0 -1px 0 var(--hh-panel-border);
}

@media (max-width: 860px) {
  .user-app:has(.home-hero-official) .home-hero-official.home-hero-themed {
    padding: 25px 22px 23px;
    border-radius: var(--hh-radius);
  }

  .user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-title {
    font-size: min(var(--hh-title-size), 36px);
  }

  .user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-console {
    min-height: 210px;
  }

  .user-app:has(.home-hero-official) .home-hero-official.home-hero-themed[data-hero-style="journal"] .home-hero-console {
    border-top: 2px solid var(--hh-accent);
    border-left: 0;
    padding-left: 16px;
  }
}

@media (max-width: 560px) {
  .user-app:has(.home-hero-official) .home-hero-official.home-hero-themed {
    padding: 21px 17px 19px;
  }

  .user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-title {
    font-size: min(var(--hh-title-size), 30px);
  }

  .user-app:has(.home-hero-official) .home-hero-official.home-hero-themed .home-hero-console {
    min-height: 0;
  }
}

/* The account console has moved to the profile page. */
.user-app:has(.home-hero-official) .home-hero-inner:not(:has(.home-hero-console)) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "copy"
    "slogan"
    "actions";
  align-items: start;
}

.user-app:has(.home-hero-official) .home-hero-inner:not(:has(.home-hero-console)) .home-hero-copy {
  max-width: 900px;
}
