/**
 * Homepage (index.html) — layout & components. Requires site-theme.css variables.
 */

body.home-page {
  margin: 0;
  min-height: 100vh;
  padding: var(--space-4, 24px) clamp(var(--space-3, 16px), 4vw, var(--space-5, 32px));
  font-family: var(--haa-font-body);
  color: var(--text);
  line-height: 1.75;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 110% 60% at 50% -10%, var(--accent-glow), transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 60%, var(--cool), transparent 45%),
    linear-gradient(165deg, var(--bg-soft) 0%, var(--bg) 40%, var(--bg) 100%),
    url("Images/First%20recorded%20computer%20music.avif");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: auto, auto, auto, cover;
  background-position: top, top right, center, center center;
  background-attachment: scroll, scroll, scroll, fixed;
}

body.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.home-page .nav {
  position: relative;
  z-index: 200;
}

body.home-page .home-landing {
  position: relative;
  z-index: 1;
}

.home-landing {
  max-width: var(--haa-max);
  margin: 0 auto;
  padding: 0 0 40px;
  box-sizing: border-box;
}

.home-content {
  max-width: min(920px, 100%);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

#homeRecentTools {
  overflow: visible;
}

#homeRecentTools .home-tools-carousel {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.intro {
  margin-top: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.intro.visible {
  opacity: 1;
  transform: translateY(0);
}

.home-hero.intro {
  margin-top: 0;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(16px, 2.5vw, 28px);
  padding: clamp(4px, 1.5vw, 12px) 0 clamp(4px, 1vw, 8px);
  min-height: 0;
}

.home-hero h1 {
  font-size: clamp(28px, 4.5vw, 38px);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.15);
}

.home-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--haa-accent-soft);
  margin: 0 0 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.45;
}

.home-hero .home-lead {
  font-family: var(--haa-font-body);
  font-size: 16px;
  color: var(--haa-text-soft);
  margin: 0 auto 20px;
  max-width: 38rem;
  text-align: center;
  text-align-last: center;
  line-height: 1.7;
}

.home-scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  color: var(--haa-text-muted);
  font-family: var(--haa-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s ease;
}

.home-scroll-cue:hover {
  color: var(--haa-accent-soft);
  text-decoration: none;
}

.home-scroll-cue i {
  font-size: 12px;
  opacity: 0.75;
  animation: home-scroll-nudge 1.6s ease-in-out infinite;
}

@keyframes home-scroll-nudge {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(5px); opacity: 1; }
}

.home-cta-single-link {
  display: inline-block;
  margin-right: 0;
  background: transparent;
  color: var(--haa-link);
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  max-width: min(100%, 26rem);
  text-align: center;
  line-height: 1.45;
  white-space: normal;
}

.home-cta-single-link:hover {
  background: var(--surface-subtle);
  color: var(--haa-link-hover);
  border-color: color-mix(in srgb, var(--haa-accent-soft) 28%, var(--haa-border));
  box-shadow: none;
  text-decoration: none;
}

.home-section {
  margin-bottom: clamp(36px, 6vw, 72px);
}

.home-section h2 {
  font-size: clamp(18px, 2.4vw, 21px);
  font-weight: 700;
  color: var(--haa-accent-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
  text-align: center;
  line-height: 1.25;
}

.home-section h2.home-section-title {
  text-align: left;
  letter-spacing: 0.06em;
}

.home-band {
  padding: clamp(20px, 4vw, 28px) 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--haa-border);
  background: transparent;
}

.home-band-muted {
  background: transparent;
  border-color: var(--haa-border);
}

.home-tight p,
.home-audience {
  font-family: var(--haa-font-body);
  font-size: 15px;
  color: var(--haa-text-soft);
  line-height: 1.72;
  margin: 0 0 12px;
  max-width: 40rem;
}

.home-tight p:last-child {
  margin-bottom: 0;
}

.home-theme-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-theme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--haa-radius);
  padding: var(--space-4, 24px);
}

.home-theme-label {
  font-family: var(--haa-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haa-accent-soft);
  margin: 0 0 10px;
}

.home-theme-card p {
  font-family: var(--haa-font-body);
  font-size: 14px;
  color: var(--haa-text-soft);
  margin: 0;
  line-height: 1.65;
}

.home-grow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 42rem;
  display: grid;
  gap: 14px;
}

.home-grow-list li {
  font-family: var(--haa-font-body);
  font-size: 14px;
  color: var(--haa-text-soft);
  line-height: 1.65;
  padding-left: 18px;
  border-left: 2px solid rgba(212, 175, 55, 0.28);
}

.home-grow-step {
  display: block;
  font-family: var(--haa-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haa-text-muted);
  margin-bottom: 4px;
}

.home-purpose-list {
  margin: 0 0 16px;
  padding: 0 0 0 1.15em;
  max-width: 40rem;
  font-family: var(--haa-font-body);
  font-size: 15px;
  color: var(--haa-text-soft);
  line-height: 1.72;
}

.home-purpose-list li {
  margin-bottom: 10px;
}

.home-purpose-list li:last-child {
  margin-bottom: 0;
}

.home-purpose-list strong {
  color: var(--haa-text);
  font-weight: 600;
}

.home-inline-nav {
  font-family: var(--haa-font-body);
  font-size: 14px;
  color: var(--haa-text-muted);
  margin: 0;
  max-width: 40rem;
}

.home-inline-nav a {
  margin-right: 0.35em;
  margin-left: 0.08em;
}

.home-cta-block {
  text-align: center;
  padding: clamp(28px, 5vw, 44px) 16px;
  border-top: 1px solid var(--haa-border);
  margin-top: clamp(8px, 2vw, 16px);
}

.home-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.home-cta {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--haa-radius-sm, 10px);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.home-cta--primary {
  background: var(--haa-accent, #d4af37);
  color: #0a0a0c;
  border: 1px solid transparent;
}

.home-cta--primary:hover {
  filter: brightness(1.06);
}

.home-cta--ghost {
  border: 1px solid var(--haa-border-strong);
  color: var(--text-soft);
  background: transparent;
}

.home-cta--ghost:hover {
  border-color: rgba(212, 175, 55, 0.35);
  color: var(--text);
}

.home-dynamic-sections,
.home-dynamic-section {
  display: block;
}

.home-dynamic-section {
  margin-top: 0;
  margin-bottom: 0;
  padding: clamp(20px, 3vw, 28px) 0;
}

.home-feed-section + .home-feed-section {
  border-top: 1px solid color-mix(in srgb, var(--haa-border) 85%, transparent);
}

.home-section-title--with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-section-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.85;
}

.home-section-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 0 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.home-feed-section {
  margin-top: 0;
}

.home-content > .home-feed-section:first-child {
  margin-top: 0;
  padding-top: 0;
}

.home-content > .home-feed-section:first-child.intro {
  margin-top: 4px;
}

/* Dynamic homepage sections — always visible (not tied to scroll observer) */
.home-feed-section.intro,
.home-dynamic-section.intro {
  opacity: 1;
  transform: none;
}

.home-dynamic-section .section-eyebrow {
  margin: 0 0 6px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-dynamic-section .home-section-title {
  margin: 0 0 4px;
  text-align: left;
  color: var(--accent-soft);
}

/* Thin rule under section titles — matches .home-preview-list top border rhythm */
.home-section-divider {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--haa-border);
  height: 0;
  background: transparent;
}

#homeRecentTools .home-section-divider {
  margin: 14px 0 0;
}

#homeRecentTools .home-section-divider + .home-tools-carousel {
  margin-top: 10px;
}

/* Home sections use .intro globally — override prose link styling on item rows */
.home-dynamic-section.intro a.home-preview-item__link,
.home-dynamic-section.intro a.home-carousel-card__link {
  color: var(--text);
  text-decoration: none;
  margin-right: 0;
}

.home-dynamic-section.intro a.home-preview-item__link:hover,
.home-dynamic-section.intro a.home-carousel-card__link:hover {
  color: var(--text-soft);
  text-decoration: none;
}

.home-dynamic-section.intro a.home-feed-more {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-right: 0;
}

.home-dynamic-section .home-preview-item__title,
.home-dynamic-section .home-carousel-card__title,
.home-dynamic-section.intro .home-preview-item__title,
.home-dynamic-section.intro .home-carousel-card__title {
  color: var(--text);
  text-decoration: none;
}

.home-dynamic-section.intro a.home-preview-item__link:hover .home-preview-item__title,
.home-dynamic-section.intro a.home-carousel-card__link:hover .home-carousel-card__title {
  color: var(--text-soft);
  text-decoration: none;
}

/* Recent tools carousel — slide width set in home-discovery.js (--carousel-slide-width) */
.home-tools-carousel {
  --carousel-gap: 20px;
  --carousel-visible: 1;
  --carousel-slide-width: min(100%, 320px);
  --carousel-btn-size: 40px;
  --carousel-btn-outset: 12px;
  --accent-yellow: var(--accent-soft, #e8c85c);
  --border-color: var(--border, rgba(230, 225, 215, 0.1));
  --muted: var(--text-soft);
  position: relative;
  width: 100%;
  margin-top: 0;
  box-sizing: border-box;
  overflow: visible;
}

#homeRecentTools .home-tools-carousel__stage,
#homeRecentTools .home-carousel-viewport,
#homeRecentTools .home-carousel-track {
  margin-top: 0;
  padding-top: 0;
}

.home-tools-carousel__stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.home-carousel-viewport {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  outline: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.home-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.home-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--carousel-gap, 20px);
  padding-inline: 0;
  box-sizing: border-box;
  transition: transform 320ms ease;
  will-change: transform;
}

/* Carousel tool cards: same hover/link behavior as tools page (not .intro prose overrides) */
.home-tools-carousel .tool-card .tool-link,
.home-tools-carousel .tool-card .tool-title,
.home-tools-carousel .tool-card .tool-card__title {
  color: inherit;
  text-decoration: none;
}

.home-tools-carousel .tool-card:hover .tool-title,
.home-tools-carousel .tool-card:hover .tool-card__title {
  color: var(--haa-accent-soft);
}

/* Carousel slides — compact cards; description scrolls with always-visible scrollbar */
.home-carousel-track .tool-card.home-carousel-slide {
  flex: 0 0 var(--carousel-slide-width);
  width: var(--carousel-slide-width);
  max-width: var(--carousel-slide-width);
  min-width: 0;
  height: auto;
  max-height: 380px;
  min-height: 0;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-link {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-card__body,
.home-carousel-track .tool-card.home-carousel-slide .tool-link__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding: 14px 18px 12px;
  gap: 8px;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-card__title,
.home-carousel-track .tool-card.home-carousel-slide .tool-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--haa-accent-soft, var(--accent-soft));
}

.home-carousel-track .tool-card.home-carousel-slide .tool-meta {
  flex-shrink: 0;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-card__description,
.home-carousel-track .tool-card.home-carousel-slide .tool-copy {
  flex: 0 0 auto;
  display: block;
  max-height: 4.5em;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent, #d4af37) 50%, var(--border-strong)) transparent;
  -webkit-overflow-scrolling: touch;
  color: var(--haa-text-soft, var(--text-soft));
  font-size: 13px;
  line-height: 1.5;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-card__description::-webkit-scrollbar,
.home-carousel-track .tool-card.home-carousel-slide .tool-copy::-webkit-scrollbar {
  width: 7px;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-card__description::-webkit-scrollbar-track,
.home-carousel-track .tool-card.home-carousel-slide .tool-copy::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--border-strong, rgba(255, 255, 255, 0.16)) 55%, transparent);
  border-radius: 999px;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-card__description::-webkit-scrollbar-thumb,
.home-carousel-track .tool-card.home-carousel-slide .tool-copy::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent, #d4af37) 45%, var(--text-muted));
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 40%, transparent);
}

.home-carousel-track .tool-card.home-carousel-slide .tool-action {
  flex-shrink: 0;
  margin-top: 2px;
}

.home-carousel-track .tool-card.home-carousel-slide .tool-card__footer,
.home-carousel-track .tool-card.home-carousel-slide .tool-card__foot {
  flex-shrink: 0;
}

.home-tools-carousel .tool-card .tool-copy:empty,
.home-tools-carousel .tool-card .tool-card__description:empty {
  display: none;
}

.home-tools-carousel--few .home-carousel-track,
.home-tools-carousel--static .home-carousel-track {
  justify-content: center;
}

.home-carousel-card__media {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  max-height: 240px;
  min-height: 0;
  margin: 0;
  padding: 0;
  position: relative;
  background: var(--bg-soft, #0d0d0f);
  overflow: hidden;
  flex-shrink: 0;
}

.home-carousel-card__img {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
  padding: 0;
}

.home-carousel-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.home-carousel-card__img--placeholder {
  object-fit: contain;
  padding: 18%;
  opacity: 0.55;
}

.home-carousel-card__body {
  padding: 10px 12px 4px;
  flex: 0 1 auto;
}

.home-carousel-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.home-carousel-card__title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.home-carousel-card__desc {
  margin: 0 0 8px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-carousel-card__tag {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-carousel-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  margin-top: auto;
  flex-wrap: wrap;
  border-top: 1px solid color-mix(in srgb, var(--haa-border-strong) 70%, transparent);
}

.home-carousel-card__discuss {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--haa-accent-soft);
  text-decoration: none;
}

.home-carousel-card__discuss:hover {
  text-decoration: underline;
}

.home-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 auto;
  z-index: 3;
  width: var(--carousel-btn-size, 40px);
  height: var(--carousel-btn-size, 40px);
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--haa-border-strong);
  background: color-mix(in srgb, var(--haa-surface) 92%, var(--bg) 8%);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.home-carousel-btn--prev {
  left: calc(-1 * (var(--carousel-btn-size, 40px) + var(--carousel-btn-outset, 12px)));
}

.home-carousel-btn--next {
  right: calc(-1 * (var(--carousel-btn-size, 40px) + var(--carousel-btn-outset, 12px)));
}

.home-carousel-btn span {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  transform: translateY(-1px);
  pointer-events: none;
  user-select: none;
}

.home-carousel-btn:hover {
  border-color: rgba(212, 175, 55, 0.35);
  background: color-mix(in srgb, var(--haa-surface) 92%, var(--accent) 8%);
}

.home-carousel-btn:disabled {
  opacity: 1;
  cursor: pointer;
}

.home-tools-carousel--static .home-carousel-btn {
  opacity: 0.35;
  pointer-events: none;
}

.home-carousel-curated-note {
  margin: 0 0 8px;
}

.home-tools-carousel--empty .home-carousel-btn {
  display: none;
}

.home-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.home-feed-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--haa-radius-sm, 10px);
  border: 1px solid var(--haa-border-strong);
  background: var(--haa-surface);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.home-feed-card:hover {
  border-color: rgba(212, 175, 55, 0.28);
  transform: translateY(-2px);
}

.home-feed-card__kind {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-feed-card__title {
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text);
}

.home-feed-card__meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.home-feed-card__desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-feed-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.home-feed-card__discuss {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}

.home-feed-card__discuss:hover {
  color: var(--accent-soft, #e8c96a);
}

.home-feed-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.home-feed-more:hover {
  color: var(--haa-accent, #d4af37);
  text-decoration-color: color-mix(in srgb, var(--haa-accent) 65%, transparent);
}

.home-feed-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-feed-card-wrap .home-feed-card {
  flex: 1;
}

.home-feed-card__share {
  align-self: flex-end;
}

.home-feed-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px 0 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 42ch;
}

.home-feed-empty--error {
  color: var(--text-soft);
}

.home-feed-empty--subtle {
  padding: 12px 0 4px;
  font-size: 0.8rem;
}

.home-feed-curated-note {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0 4px;
  max-width: 36ch;
}

.home-empty-state__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.home-cta--compact {
  padding: 10px 18px;
  font-size: 0.68rem;
}

.home-feed-section--subtle .home-section-title {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.home-feed-section--subtle .home-feed-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.home-feed-section--subtle .home-feed-card {
  padding: 12px 14px;
}

.home-collections.intro,
.home-collections.home-feed-section.intro {
  opacity: 1;
  transform: none;
}

.home-collections,
#homeCollectionsPreview {
  margin-top: clamp(12px, 2vw, 20px);
  margin-bottom: 0;
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--haa-border-strong, rgba(255, 255, 255, 0.1));
}

.home-collections-lead {
  margin: 0 0 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 42ch;
}

.home-collections-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-collection-link {
  display: block;
  padding: 14px 16px;
  border-radius: var(--haa-radius-sm, 10px);
  border: 1px solid var(--haa-border-strong);
  background: var(--haa-surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.home-collection-link:hover {
  border-color: rgba(212, 175, 55, 0.28);
  transform: translateY(-1px);
  color: var(--accent-soft, #e8c96a);
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Editorial preview lists (discussions, research, events) */
.home-preview-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid var(--haa-border);
}

.home-preview-item {
  border-bottom: 1px solid var(--haa-border);
}

.home-preview-item__link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 9px 0;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s ease, background 0.2s ease;
}

.home-preview-item__link:hover {
  color: var(--text-soft);
  text-decoration: none;
}

.home-preview-item__title {
  flex: 1 1 12rem;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.home-preview-item__link:hover .home-preview-item__title {
  color: var(--text-soft);
  text-decoration: none;
}

.home-preview-item__meta {
  flex: 0 1 auto;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.home-preview-item__empty,
.home-preview-item--empty .home-preview-item__empty {
  margin: 0;
  padding: 12px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  border: none;
}

.home-preview-item__empty--subtle {
  font-size: 0.78rem;
  padding: 8px 0;
}

.home-feed-section--subtle .home-section-title {
  font-weight: 600;
  opacity: 0.92;
}

.home-feed-section--subtle .home-preview-list {
  border-top-color: color-mix(in srgb, var(--haa-border) 70%, transparent);
}

@media (max-width: 768px) {
  body.home-page {
    padding: 20px 14px;
  }

  .home-landing {
    padding: 0 0 32px;
  }

  .home-section h2 {
    font-size: 17px;
  }

  .home-theme-grid {
    grid-template-columns: 1fr;
  }

  .home-tools-carousel {
    --carousel-btn-size: 36px;
    --carousel-btn-outset: 10px;
  }

  .home-carousel-btn {
    width: var(--carousel-btn-size);
    height: var(--carousel-btn-size);
  }

  .home-carousel-card__media {
    max-height: 200px;
    min-height: 140px;
  }

  .home-preview-item__meta {
    white-space: normal;
  }
}

body.home-page .home-preview-item__link,
body.home-page .home-preview-item__link:hover,
body.home-page .home-preview-item__title,
body.home-page .home-preview-item__link:hover .home-preview-item__title,
body.home-page .home-carousel-card__link,
body.home-page .home-carousel-card__link:hover,
body.home-page .home-carousel-card__title,
body.home-page .home-carousel-card__link:hover .home-carousel-card__title,
body.home-page .home-feed-card,
body.home-page .home-feed-card:hover,
body.home-page .home-feed-card__title,
body.home-page .home-feed-card:hover .home-feed-card__title {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

body.home-page .home-preview-item__title,
body.home-page .home-carousel-card__title,
body.home-page .home-feed-card__title {
  color: var(--text) !important;
}

body.home-page .home-feed-more {
  text-decoration: underline;
  text-underline-offset: 3px;
}
