/* Homepage-only refinements. This file loads after the legacy cascade. */
body.home-page .home-products {
    padding: clamp(3.5rem, 5vw, 4.75rem) 0;
    background: #ffffff;
}

body.home-page .home-products .home-section-heading {
    display: grid;
    grid-template-columns: minmax(0, .72fr) minmax(28rem, 1.28fr);
    align-items: end;
    gap: clamp(2rem, 5vw, 5rem);
    max-width: none;
    margin-bottom: 2.25rem;
}

body.home-page .home-products .home-section-heading .home-eyebrow {
    margin: 0 0 .2rem;
}

body.home-page .home-products .home-section-heading h2 {
    font-size: clamp(2.25rem, 4vw, 3.65rem);
    line-height: .98;
}

body.home-page .home-product-grid {
    border: 1px solid #d2d2d2;
}

body.home-page .home-product {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-width: 0;
    padding: 1.5rem clamp(1.35rem, 2.5vw, 2rem) 1.65rem;
    background: #ffffff;
}

body.home-page .home-product:first-child,
body.home-page .home-product:last-child {
    padding: 1.5rem clamp(1.35rem, 2.5vw, 2rem) 1.65rem;
}

body.home-page .home-product__number {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 28px;
    padding: 0 .55rem;
    color: #064e52;
    background: #d8efef;
    font-size: .72rem;
    letter-spacing: .08em;
}

body.home-page .home-product h3 {
    margin: 1.1rem 0 .55rem;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    line-height: 1.1;
}

body.home-page .home-product p {
    min-height: 0;
    margin: 0 0 1.15rem;
    font-size: .96rem;
}

body.home-page .home-product a {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 44px;
    text-decoration: none;
}

body.home-page .home-product a span {
    margin-left: .45rem;
    transition: transform 160ms ease;
}

body.home-page .home-product a:hover span,
body.home-page .home-product a:focus-visible span {
    transform: translateX(3px);
}

/* Tool links are surfaced as cards by the final visual layer. Restore a
   consistent inset after the legacy split-grid rules remove it from odd and
   full-width items. */
body.home-page .home-tool-links__grid > a,
body.home-page .home-tool-links__grid > a:nth-child(odd),
body.home-page .home-tool-links__grid > a:nth-child(even),
body.home-page .home-tool-links__grid > a:last-child:nth-child(odd) {
    padding: clamp(1.25rem, 2.4vw, 1.6rem);
}

body.home-page .home-workspace-story__features li::before {
    content: "\2713";
}

@media (max-width: 767.98px) {
    body.home-page .home-products {
        padding: 2.5rem 0;
    }

    body.home-page .home-products .home-section-heading {
        display: block;
        margin-bottom: 1.25rem;
    }

    body.home-page .home-products .home-section-heading .home-eyebrow {
        margin-bottom: .75rem;
    }

    body.home-page .home-products .home-section-heading h2 {
        max-width: 21rem;
        font-size: clamp(1.9rem, 9vw, 2.35rem);
    }

    body.home-page .home-product-grid {
        border-top: 1px solid #d2d2d2;
        border-bottom: 1px solid #d2d2d2;
        border-left: 0;
        border-right: 0;
    }

    body.home-page .home-product,
    body.home-page .home-product:first-child,
    body.home-page .home-product:last-child {
        grid-template-columns: 2.6rem minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        column-gap: .85rem;
        padding: 1rem 0;
        border-right: 0;
        border-bottom: 1px solid #d2d2d2;
    }

    body.home-page .home-product:last-child {
        border-bottom: 0;
    }

    body.home-page .home-product__number {
        grid-row: 1 / span 3;
        justify-content: center;
        width: 2.6rem;
        padding: 0;
    }

    body.home-page .home-product h3 {
        margin: 0 0 .35rem;
        font-size: 1.25rem;
    }

    body.home-page .home-product p {
        margin: 0 0 .4rem;
        font-size: .875rem;
        line-height: 1.38;
    }

    body.home-page .home-product a {
        min-height: 40px;
        font-size: .92rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.home-page .home-product a span {
        transition: none;
    }
}

/* ===== Homepage: generator preview + live market charts ===== */
.domain-search-links a.domain-search-links__primary { background: #08757a; color: #fff !important; padding: 7px 14px; border-radius: 999px; text-decoration: none !important; }
.domain-search-links a.domain-search-links__primary svg { stroke: #fff; }
.domain-search-links a.domain-search-links__primary:hover { background: #065f63; }

.home-market { padding: 56px 0 24px; }
.home-market__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.home-market__head h2 { margin: 4px 0 0; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; }
.home-market__updated { font-size: .85rem; color: #6b7a80; }
.home-market__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.home-market-card { background: #fff; border: 1px solid #e3eaeb; border-radius: 18px; padding: 20px; box-shadow: 0 8px 24px rgba(15, 42, 44, 0.05); display: flex; flex-direction: column; }
.home-market-card--wide { grid-column: 1 / -1; }
.home-market-card h3 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.home-market-card__sub { font-size: .85rem; color: #6b7a80; margin: 4px 0 10px; }
.home-market-card__top { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.home-market-card__big { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; color: #08757a; margin: 6px 0 0; }
.home-market-card__big small, .home-market-card__aside small { display: block; font-size: .8rem; font-weight: 500; color: #6b7a80; letter-spacing: 0; }
.home-market-card__aside { font-size: 1.25rem; font-weight: 800; color: #0f2a2c; text-align: right; margin: 0; }
.home-reg-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin: 18px 0 12px; }
.home-reg-bars span { flex: 1 1 0; min-width: 3px; background: linear-gradient(180deg, #2aa3a8, #08757a); border-radius: 4px 4px 1px 1px; opacity: .85; }
.home-reg-bars span:hover { opacity: 1; background: #065f63; }
.home-reg-bars span:last-child { background: #f59e0b; opacity: 1; }
.home-trend-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.home-trend-list li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 62px; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f0f4f4; }
.home-trend-list li:last-child { border-bottom: 0; }
.home-trend-list a { font-weight: 700; color: #0f2a2c; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-trend-list a:hover { color: #08757a; }
.home-trend-list svg { width: 110px; height: 30px; }
.home-trend-list path { fill: none; stroke: #08757a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-trend-list__up, .home-trend-list__lift { justify-self: end; font-size: .8rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.home-trend-list__up { color: #1e8e3e; background: #e6f4ea; }
.home-trend-list__lift { color: #8a4b00; background: #fef3c7; }
.home-market-card__link { margin-top: auto; font-weight: 700; color: #08757a; font-size: .9rem; }
@media (max-width: 860px) {
  .home-market__grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .home-trend-list li { grid-template-columns: minmax(0, 1fr) 80px 56px; gap: 8px; }
  .home-trend-list svg { width: 80px; }
  .home-reg-bars { height: 90px; gap: 2px; }
}
body.bg-light .home-market-card p.home-market-card__big { color: #08757a !important; margin: 8px 0 0; line-height: 1.05; }
body.bg-light .home-market-card p.home-market-card__aside { color: #0f2a2c !important; }
.home-market-card__big small { margin-top: 4px; }

/* Homepage hero search: a thicker teal border so the main action stands out. */
body.bg-light .registrar-home .domain-search-hero form.domain-search-form.uid-search-control--hero {
    border: 3px solid rgba(8, 117, 122, 0.55) !important;
    box-shadow: 0 10px 30px rgba(8, 63, 66, 0.12) !important;
}
body.bg-light .registrar-home .domain-search-hero form.domain-search-form.uid-search-control--hero:focus-within {
    border-color: #08757a !important;
    box-shadow: 0 0 0 4px rgba(8, 117, 122, 0.15), 0 10px 30px rgba(8, 63, 66, 0.12) !important;
}

/* ===== Homepage polish: left-aligned products heading with icons, stats box,
   compact recent searches, light "more ways" list ===== */
body.home-page .home-products .home-section-heading {
    display: block;
    max-width: 760px;
    margin-bottom: 2rem;
    text-align: left;
}
body.home-page .home-products .home-section-heading .home-eyebrow { margin: 0 0 .6rem; }
.home-product__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #e6f4f4; color: #08757a; margin-bottom: 14px; }
.home-product__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.home-page .home-product .home-product__number { margin-left: 8px; vertical-align: top; }

/* The big count made the two-column stats box wider than its card, hiding its right border. */
body.bg-light .home-offer .trend-snapshot { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); max-width: 100%; }
body.bg-light .home-offer .trend-snapshot dt { font-size: clamp(1.2rem, 2.3vw, 1.85rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Recent searches: compact three-column cards */
body.bg-light .home-recent { padding: clamp(2.5rem, 5vw, 4rem) 0; }
body.bg-light .home-recent .home-section-heading h2 { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; line-height: 1.1; }
body.bg-light .home-recent .home-section-heading--row { border-bottom: 0 !important; padding-bottom: 0 !important; margin-bottom: 1.1rem !important; align-items: end; }
body.bg-light .home-recent .recent-domain-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border: 0 !important; }
body.bg-light .home-recent .recent-domain { display: flex !important; flex-direction: column; justify-content: space-between; gap: 10px; padding: 14px 16px !important; margin: 0 !important; border: 1px solid #e6e1d8 !important; border-radius: 12px !important; background: #fff !important; box-shadow: none !important; }
body.bg-light .home-recent .recent-domain h3 { font-size: 1.02rem !important; line-height: 1.25; margin: 0 0 4px !important; }
body.bg-light .home-recent .recent-domain h3 a { color: #0f2a2c; text-decoration: none; }
body.bg-light .home-recent .recent-domain h3 a:hover { color: #08757a; }
body.bg-light .home-recent .recent-domain p { font-size: .82rem !important; color: #6b7a80 !important; margin: 0 !important; }
body.bg-light .home-recent .recent-domain__actions { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
body.bg-light .home-recent .recent-domain__score { font-size: .72rem !important; font-weight: 700; color: #08757a !important; background: #e6f4f4; padding: 2px 8px; border-radius: 999px; letter-spacing: 0 !important; }
body.bg-light .home-recent .recent-domain__actions a { padding: 0 !important; border: 0 !important; background: none !important; font-size: .85rem; font-weight: 700; color: #08757a !important; min-height: 0 !important; }

/* More ways: a light icon list instead of bulky cards */
body.bg-light .home-tool-links { padding: clamp(2.5rem, 5vw, 4rem) 0; }
body.bg-light .home-tool-links h2 { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; line-height: 1.1; margin-bottom: 1.1rem !important; }
body.bg-light .home-tool-links .home-tool-links__grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 24px; border: 0 !important; background: none !important; }
body.bg-light .home-tool-links .home-tool-links__grid a { display: grid !important; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 10px !important; border: 0 !important; border-radius: 10px !important; background: none !important; box-shadow: none !important; min-height: 0 !important; text-decoration: none; }
body.bg-light .home-tool-links .home-tool-links__grid a:hover { background: #f1f7f7 !important; }
body.bg-light .home-tool-links .home-tool-links__grid a i { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #e6f4f4; color: #08757a; }
body.bg-light .home-tool-links .home-tool-links__grid a i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.bg-light .home-tool-links .home-tool-links__grid a strong { font-size: .98rem; color: #0f2a2c; }
body.bg-light .home-tool-links .home-tool-links__grid a span { font-size: .84rem; color: #6b7a80; }

@media (max-width: 860px) {
    body.bg-light .home-recent .recent-domain-list,
    body.bg-light .home-tool-links .home-tool-links__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    body.bg-light .home-recent .recent-domain-list,
    body.bg-light .home-tool-links .home-tool-links__grid { grid-template-columns: 1fr; }
}
/* second pass: override older layout rules */
body.home-page .home-product .home-product__icon { display: inline-flex !important; vertical-align: middle; margin: 0 10px 14px 0 !important; }
body.home-page .home-product .home-product__icon svg { width: 22px !important; height: 22px !important; }
body.home-page .home-product .home-product__number { display: inline-flex !important; vertical-align: middle; margin: 0 0 14px 0 !important; }
body.bg-light .home-recent .recent-domain,
body.bg-light .home-recent .recent-domain > div { text-align: left !important; align-items: stretch !important; }
body.bg-light .home-recent .recent-domain > div:first-child { padding: 0 !important; margin: 0 !important; }
body.bg-light .home-recent .recent-domain__actions { justify-content: space-between !important; width: 100%; }
body.bg-light .home-tool-links .home-tool-links__grid a { grid-column: auto !important; grid-row: auto !important; width: auto !important; }
body.bg-light .home-tool-links .home-tool-links__grid a strong { grid-column: 2; align-self: end; }
body.bg-light .home-tool-links .home-tool-links__grid a span { grid-column: 2; align-self: start; }
/* product cards stack their children; put the step number in the top-right corner */
body.home-page .home-product { position: relative; }
body.home-page .home-product .home-product__number { position: absolute; top: 24px; right: 24px; margin: 0 !important; }
body.home-page .home-product .home-product__icon { margin: 0 0 16px 0 !important; align-self: flex-start; }

/* Mobile: the older two-column product layout (number | content) breaks with the
   icon, so cards stack in one column; recent-searches heading stays left-aligned. */
@media (max-width: 767.98px) {
    body.home-page .home-product,
    body.home-page .home-product:first-child,
    body.home-page .home-product:last-child {
        display: block !important;
        padding: 1.25rem 0 1.25rem !important;
    }
    body.home-page .home-product .home-product__icon { display: inline-flex !important; margin: 0 0 12px 0 !important; }
    body.home-page .home-product .home-product__number { top: 1.25rem; right: 0; }
    body.home-page .home-product h3 { margin: 0 0 .45rem !important; }
    body.home-page .home-product p { margin: 0 0 .6rem !important; }
    body.bg-light .home-recent .home-section-heading--row,
    body.bg-light .home-recent .home-section-heading--row > div {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start !important;
        text-align: left !important;
        gap: .35rem;
    }
    body.bg-light .home-recent .home-section-heading--row .home-text-link { align-self: flex-start; min-height: 0; }
    body.bg-light .home-recent .home-section-heading h2 { margin: 0 !important; }
}
@media (max-width: 767.98px) {
    body.home-page .home-product,
    body.home-page .home-product:first-child,
    body.home-page .home-product:last-child { padding: 1.25rem !important; }
    body.home-page .home-product .home-product__number { top: 1.25rem; right: 1.25rem; }
}

/* Mobile task links get a translucent white card (usability.css); keep the
   primary "Generate names" link teal so its white text stays visible. */
@media (max-width: 767.98px) {
    body.bg-light .domain-search-hero .domain-search-links a.domain-search-links__primary {
        border-color: #08757a;
        background: #08757a;
        color: #fff !important;
    }
    body.bg-light .domain-search-hero .domain-search-links a.domain-search-links__primary:hover {
        background: #065f63;
    }
}
