/* Home: "ways to start" bento, account/app strip and the AI banner demo.
   Loaded after home_tasks.css / home_ai_banner.css so it can restyle them without touching the originals. */

@property --tt-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

/* ================= Bento: three ways to start ================= */
.tt-home-tasks__list.tt-bento {
    display: grid;
    gap: 18px;
}

.tt-home-tasks__list.tt-bento > li:not(:last-child)::after {
    display: none;
}

.tt-bento__card {
    --spot: rgba(255, 122, 61, .14);
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--tt-home-border, #dde3e9);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(20, 35, 45, .07);
    transition: transform .35s var(--ui-ease, ease), box-shadow .35s ease, border-color .35s ease;
}

/* A faint tint in one corner gives every card its own mood without a second palette. */
.tt-bento__card::after {
    position: absolute;
    top: -90px;
    right: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    content: "";
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 122, 61, .14), transparent 68%);
    transition: transform .6s var(--ui-ease, ease);
}

.tt-bento__card--plan {
    --spot: rgba(46, 160, 110, .16);
}

.tt-bento__card--plan::after {
    background: radial-gradient(circle, rgba(46, 160, 110, .15), transparent 68%);
}

.tt-bento__card--map {
    --spot: rgba(60, 130, 210, .15);
}

.tt-bento__card--map::after {
    background: radial-gradient(circle, rgba(60, 130, 210, .15), transparent 68%);
}

.tt-bento__card:hover {
    border-color: #ffc3a0;
    box-shadow: 0 24px 52px rgba(255, 103, 29, .15);
    transform: translateY(-4px);
}

.tt-bento__card:hover::after {
    transform: scale(1.25) translate(-12px, 12px);
}

.tt-bento__card .tt-task {
    min-height: 0;
    padding: 24px 24px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.tt-bento__card .tt-task:hover,
.tt-bento__card .tt-task:focus-visible,
.tt-bento__card .tt-task:active {
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.tt-bento__card .tt-task:focus-visible {
    outline-offset: -4px;
    border-radius: 24px;
}

.tt-bento__card .tt-task__icon {
    transition: transform .4s var(--ui-ease, ease);
}

.tt-bento__card:hover .tt-task__icon {
    transform: rotate(-6deg) scale(1.07);
}

.tt-bento__card .tt-task__copy strong {
    font-size: 19px;
}

/* ---- Card 1: popular queries live inside "Find a route" ---- */
.tt-bento__card--find .tt-route-finder.tt-route-finder--compact,
body.page-home-redesign .tt-bento__card--find .tt-route-finder.tt-route-finder--compact {
    position: relative;
    z-index: 2;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0 24px 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder.tt-route-finder--compact > h2 {
    margin: 0 0 12px;
    color: #7a8593;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .09em;
    line-height: 1.3;
    text-transform: uppercase;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples {
    display: grid;
    overflow: visible;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a {
    display: flex;
    min-height: 62px;
    flex: none;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e6ebf0;
    border-radius: 16px;
    background: #f7f9fb;
    transition: transform .25s var(--ui-ease, ease), border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a:hover,
body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a:focus-visible {
    border-color: #ffad7e;
    background: #fff;
    box-shadow: 0 10px 22px rgba(255, 112, 39, .15);
    transform: translateY(-3px);
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a img {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    transition: transform .35s var(--ui-ease, ease);
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a:hover img {
    transform: scale(1.14) rotate(-5deg);
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a strong {
    font-size: 13.5px;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a small {
    font-size: 12px;
}

/* Chips pop in one after another when the card scrolls into view. */
.js-reveal .tt-bento__card--find:not(.is-visible) .tt-route-finder__examples a {
    opacity: 0;
    transform: translateY(10px);
}

.js-reveal .tt-bento__card--find.is-visible .tt-route-finder__examples a {
    animation: tt-chip-in .6s var(--ui-ease, ease) backwards;
}

.tt-route-finder__examples a:nth-child(1) { animation-delay: .25s; }
.tt-route-finder__examples a:nth-child(2) { animation-delay: .32s; }
.tt-route-finder__examples a:nth-child(3) { animation-delay: .39s; }
.tt-route-finder__examples a:nth-child(4) { animation-delay: .46s; }
.tt-route-finder__examples a:nth-child(5) { animation-delay: .53s; }
.tt-route-finder__examples a:nth-child(6) { animation-delay: .6s; }
.tt-route-finder__examples a:nth-child(7) { animation-delay: .67s; }

@keyframes tt-chip-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.96);
    }
}

/* ---- Card 2: a route draws itself over the hills ---- */
.tt-task__art {
    position: relative;
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 16px;
    pointer-events: none;
}

.tt-task__art > svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tt-task__art--plan {
    height: 132px;
    color: #8ea3c0;
    container-type: inline-size;
}

.tt-task__art-hills--near {
    opacity: .7;
}

.tt-task__art-guide {
    fill: none;
    stroke: rgba(70, 90, 115, .28);
    stroke-dasharray: 3 5;
    stroke-width: 1.4;
}

.tt-task__art-route {
    fill: none;
    stroke: #ff6a1a;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5;
    filter: drop-shadow(0 4px 6px rgba(255, 106, 26, .3));
    animation: tt-route-draw 7s var(--ui-ease, ease) infinite;
}

.tt-task__art-halo {
    fill: rgba(255, 106, 26, .16);
    transform-box: fill-box;
    transform-origin: center;
    animation: tt-pin-pulse 2.4s ease-in-out infinite;
}

.tt-task__art-pin {
    fill: #fff;
    stroke: #22a35a;
    stroke-width: 5;
    filter: drop-shadow(0 3px 5px rgba(20, 60, 40, .22));
}

.tt-task__art-pin--end {
    stroke: #ff6a1a;
    filter: drop-shadow(0 3px 6px rgba(255, 106, 26, .35));
}

.tt-task__stat {
    position: absolute;
    right: 6px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px 9px 11px;
    border: 1px solid rgba(30, 50, 70, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 24px rgba(20, 35, 50, .12);
    color: #1f2d3d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    backdrop-filter: blur(6px);
}

.tt-task__stat svg {
    width: 22px;
    height: 22px;
    flex: none;
    fill: #8a97a8;
}

/* A narrow card: the right side belongs to the climb, the top left is empty. */
@container (max-width: 400px) {
    .tt-task__stat {
        top: 0;
        right: auto;
        bottom: auto;
        left: 0;
    }
}

@keyframes tt-route-draw {
    0% { stroke-dashoffset: 1; }
    42%, 86% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1; }
}

@keyframes tt-pin-pulse {
    50% { transform: scale(1.35); opacity: .55; }
}

/* ---- Card 3: a tiny topo map ---- */
.tt-task__art--map {
    height: 124px;
    overflow: hidden;
    border: 1px solid rgba(60, 130, 210, .18);
    border-radius: 18px;
    background: #eaf4ec;
}

.tt-task__map-contours path {
    fill: none;
    stroke: rgba(70, 150, 95, .3);
    stroke-width: 1.3;
}

.tt-task__map-lake {
    fill: #d3e6f7;
}

.tt-task__map-lake-lines path {
    fill: none;
    stroke: rgba(90, 145, 200, .35);
    stroke-width: 1.2;
}

.tt-task__map-roads path {
    fill: none;
    stroke: #fff;
    stroke-linecap: round;
    stroke-width: 7;
}

.tt-task__map-trails path {
    fill: none;
    stroke: rgba(110, 120, 130, .45);
    stroke-dasharray: 2 5;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.tt-task__map-route {
    fill: none;
    stroke: #ff6a1a;
    stroke-dasharray: 6 7;
    stroke-linecap: round;
    stroke-width: 3.2;
    animation: tt-map-march 1.6s linear infinite;
}

.tt-task__map-start {
    fill: #ff6a1a;
    stroke: #fff;
    stroke-width: 4;
    filter: drop-shadow(0 0 7px rgba(255, 106, 26, .55));
}

.tt-task__map-locate {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 16px rgba(20, 35, 50, .16);
}

.tt-task__map-locate svg {
    width: 18px;
    height: 18px;
    fill: #1f2d3d;
}

@keyframes tt-map-march {
    to { stroke-dashoffset: -13; }
}

/* Narrow right column: a lower map keeps the start point in view. */
@media (min-width: 900px) and (max-width: 1040px) {
    .tt-task__art--map {
        height: 100px;
    }
}

/* ---- Layout ---- */
@media (min-width: 900px) {
    .tt-home-tasks__list.tt-bento {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
        grid-template-areas:
            "find plan"
            "find map";
    }

    .tt-bento__card--find { grid-area: find; }
    .tt-bento__card--plan { grid-area: plan; }
    .tt-bento__card--map { grid-area: map; }

    /* The tall card hands its spare height to the tiles instead of leaving a gap. */
    body.page-home-redesign .tt-bento__card--find .tt-route-finder.tt-route-finder--compact {
        display: flex;
        flex: 1;
        flex-direction: column;
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples {
        flex: 1;
        grid-auto-rows: minmax(62px, 1fr);
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a {
        gap: 14px;
        padding: 10px 18px;
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a img {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .tt-home-tasks__list.tt-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tt-bento__card--find {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .tt-home-tasks__list.tt-bento {
        gap: 14px;
    }

    .tt-bento__card {
        border-radius: 20px;
    }

    .tt-bento__card .tt-task {
        padding: 18px 16px 16px;
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder.tt-route-finder--compact {
        padding: 0 16px 16px;
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a {
        min-height: 58px;
        flex: none;
        padding: 8px 10px;
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a img {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a strong {
        white-space: normal;
    }

}

/* Cards of the older block keep their dark variant. */
html[data-theme="dark"] .tt-bento__card {
    border-color: var(--tt-home-border, #263648);
    background: linear-gradient(180deg, #111d2c 0%, #0d1827 100%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .tt-bento__card:hover {
    border-color: rgba(255, 122, 56, .55);
    box-shadow: 0 24px 52px rgba(255, 90, 20, .16);
}

html[data-theme="dark"] body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a {
    border-color: #2e4055;
    background: rgba(20, 33, 51, .9);
}

html[data-theme="dark"] body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples a:hover {
    background: rgba(30, 46, 68, .95);
}

html[data-theme="dark"] .tt-task__art--plan {
    color: #6f86a6;
}

html[data-theme="dark"] .tt-task__art-guide {
    stroke: rgba(200, 215, 235, .25);
}

html[data-theme="dark"] .tt-task__stat {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(20, 33, 51, .9);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    color: #e7eef7;
}

html[data-theme="dark"] .tt-task__stat svg {
    fill: #9fb0c6;
}

html[data-theme="dark"] .tt-task__art--map {
    border-color: rgba(120, 170, 230, .22);
    background: #14281f;
}

html[data-theme="dark"] .tt-task__map-contours path {
    stroke: rgba(120, 200, 150, .22);
}

html[data-theme="dark"] .tt-task__map-lake {
    fill: #1d3550;
}

html[data-theme="dark"] .tt-task__map-roads path {
    stroke: rgba(230, 240, 250, .22);
}

html[data-theme="dark"] .tt-task__map-trails path {
    stroke: rgba(200, 210, 220, .35);
}

html[data-theme="dark"] .tt-task__map-start {
    stroke: #14281f;
}

html[data-theme="dark"] .tt-task__map-locate {
    background: #1d2c40;
}

html[data-theme="dark"] .tt-task__map-locate svg {
    fill: #e7eef7;
}

/* ================= Account / app strip ================= */
.tt-home-tasks__more {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.tt-home-tasks__chip {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1.5px solid var(--tt-home-border, #dde3e9);
    border-radius: 20px;
    background: #fff;
    color: var(--tt-home-ink, #121922);
    text-decoration: none;
    transition: transform .3s var(--ui-ease, ease), box-shadow .3s ease, border-color .3s ease;
}

.tt-home-tasks__chip > span:last-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tt-home-tasks__chip strong {
    font-size: 15px;
    font-weight: 850;
    line-height: 1.25;
}

.tt-home-tasks__chip small {
    color: var(--tt-home-muted, #667085);
    font-size: 13px;
    line-height: 1.4;
}

.tt-home-tasks__chip-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 14px;
    background: #eef2f6;
    color: #364252;
    transition: transform .35s var(--ui-ease, ease);
}

.tt-home-tasks__chip-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.tt-home-tasks__chip:hover,
.tt-home-tasks__chip:focus-visible {
    border-color: #ffb78f;
    box-shadow: 0 16px 34px rgba(255, 103, 29, .14);
    transform: translateY(-3px);
}

.tt-home-tasks__chip:hover .tt-home-tasks__chip-icon {
    transform: rotate(-8deg) scale(1.08);
}

.tt-home-tasks__chip:focus-visible {
    outline: 3px solid rgba(255, 103, 29, .35);
    outline-offset: 3px;
}

/* The account call to action gets a slowly travelling highlight on its border. */
.tt-home-tasks__chip--primary {
    border-color: transparent;
    background:
        linear-gradient(#fff6ef, #fff6ef) padding-box,
        conic-gradient(from var(--tt-angle), #ff7a3d, #ffd9c2, #ffb27f, #ff7a3d) border-box;
    animation: tt-angle-spin 7s linear infinite;
}

.tt-home-tasks__chip--primary strong {
    color: var(--tt-home-orange-dark, #e95612);
}

.tt-home-tasks__chip--primary .tt-home-tasks__chip-icon {
    background: linear-gradient(145deg, #ff7f3f, #ff5a14);
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 90, 20, .3);
}

@keyframes tt-angle-spin {
    to { --tt-angle: 360deg; }
}

@media (min-width: 768px) {
    .tt-home-tasks__more {
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
    }
}

html[data-theme="dark"] .tt-home-tasks__chip {
    border-color: #2a3b4e;
    background: #0f1a28;
    color: #e8eef5;
}

html[data-theme="dark"] .tt-home-tasks__chip small {
    color: #a8b4c4;
}

html[data-theme="dark"] .tt-home-tasks__chip-icon {
    background: #1b2a3d;
    color: #d5deea;
}

html[data-theme="dark"] .tt-home-tasks__chip--primary {
    background:
        linear-gradient(#1c1612, #1c1612) padding-box,
        conic-gradient(from var(--tt-angle), #ff7a3d, #5a3a28, #ffb27f, #ff7a3d) border-box;
}

html[data-theme="dark"] .tt-home-tasks__chip--primary strong {
    color: #ff9460;
}

/* ================= AI banner: a live demo instead of a bare photo ================= */
.tt-ai-banner__card {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: center;
}

.tt-ai-banner__card::before {
    z-index: 0;
    --spot: rgba(255, 178, 127, .14);
}

.tt-ai-banner__copy,
.tt-ai-banner__demo {
    position: relative;
    z-index: 2;
}

.tt-ai-banner__cta {
    position: relative;
    justify-self: start;
    margin-top: 14px;
    overflow: hidden;
}

/* A highlight sweeps across the button every few seconds. */
.tt-ai-banner__cta::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    content: "";
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
    animation: ab-sweep 5.5s ease-in-out 1.5s infinite;
}

@keyframes ab-sweep {
    0%, 60% { left: -60%; }
    100% { left: 140%; }
}

.tt-ai-banner__chip svg {
    animation: ab-twinkle 2.8s ease-in-out infinite;
}

@keyframes ab-twinkle {
    50% { transform: scale(1.25) rotate(18deg); }
}

.tt-ai-banner__demo {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    background: rgba(8, 22, 16, .58);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .12);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    transition: transform .5s var(--ui-ease, ease);
}

.tt-ai-banner__card:hover .tt-ai-banner__demo {
    transform: translateY(-3px);
}

.tt-ai-banner__demo-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tt-ai-banner__demo-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
}

.tt-ai-banner__demo-bar i:first-child { background: #ff6b5e; }
.tt-ai-banner__demo-bar i:nth-child(2) { background: #ffbd4a; }
.tt-ai-banner__demo-bar i:nth-child(3) { background: #3ccf7a; }

.tt-ai-banner__demo-bar em {
    margin-left: auto;
    color: rgba(255, 255, 255, .6);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tt-ai-banner__prompt {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
}

.tt-ai-banner__prompt small {
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    font-weight: 700;
}

.tt-ai-banner__typed {
    min-height: 1.45em;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.tt-ai-banner__demo.is-typing .tt-ai-banner__typed::after {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -.15em;
    content: "";
    background: #ffb27f;
    animation: ab-caret .8s steps(1) infinite;
}

@keyframes ab-caret {
    50% { opacity: 0; }
}

.tt-ai-banner__plan {
    display: grid;
    gap: 8px;
}

.tt-ai-banner__day {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    transition: opacity .5s var(--ui-ease, ease), transform .5s var(--ui-ease, ease);
}

.tt-ai-banner__day b {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(145deg, #ff8a47, #ff5a14);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.tt-ai-banner__day > span {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.tt-ai-banner__day strong {
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.25;
}

.tt-ai-banner__day small {
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
    line-height: 1.3;
}

.tt-ai-banner__done {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a8f0c6;
    font-size: 12.5px;
    font-weight: 800;
    transition: opacity .5s ease, transform .5s var(--ui-ease, ease);
}

.tt-ai-banner__done::before {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: #2fbf71;
    color: #06240f;
    content: "\2713";
    font-size: 11px;
    font-weight: 900;
}

/* JS rewinds the demo and replays it; without JS the finished plan is shown. */
.tt-ai-banner__demo.is-animated .tt-ai-banner__day:not(.is-on) {
    opacity: 0;
    transform: translateY(12px);
}

.tt-ai-banner__demo.is-animated:not(.is-done) .tt-ai-banner__done {
    opacity: 0;
    transform: translateY(8px);
}

.tt-ai-banner__demo.is-out {
    opacity: 0;
    transition: opacity .5s ease;
}

@media (max-width: 900px) {
    .tt-ai-banner__card {
        grid-template-columns: minmax(0, 1fr);
    }

    .tt-ai-banner__demo {
        display: none;
    }
}

@media (max-width: 600px) {
    .tt-ai-banner__cta {
        justify-self: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tt-task__art-route,
    .tt-task__art-halo,
    .tt-task__map-route,
    .tt-home-tasks__chip--primary,
    .tt-ai-banner__cta::after,
    .tt-ai-banner__chip svg {
        animation: none;
    }

    .tt-task__art-route {
        stroke-dashoffset: 0;
    }

    .tt-ai-banner__demo {
        transform: none;
    }
}

html[data-theme="dark"] .tt-home-tasks__chip--primary .tt-home-tasks__chip-icon {
    background: linear-gradient(145deg, #ff7f3f, #ff5a14);
    color: #fff;
}

/* ---- Card 1 tiles, v2: even 4 x 2 grid, icon on top, last tile leads to the whole catalogue ---- */
body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    min-height: 118px;
    padding: 16px;
    border-radius: 18px;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a > span {
    gap: 4px;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a strong {
    overflow: visible;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a small {
    overflow: visible;
    font-size: 12.5px;
    line-height: 1.3;
    text-overflow: clip;
    white-space: normal;
}

/* "All routes": same size as its neighbours, but clearly the way out to the full list. */
body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a.tt-route-finder__all {
    border-color: #ffd0b4;
    background: linear-gradient(145deg, #fff3ea, #ffe4d2);
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a.tt-route-finder__all strong {
    color: var(--tt-home-orange-dark, #e95612);
}

body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a.tt-route-finder__all small {
    color: #a65a34;
}

.tt-route-finder__all > svg {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--tt-home-orange-dark, #e95612);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.3;
    transition: transform .3s var(--ui-ease, ease);
}

.tt-route-finder__all:hover > svg,
.tt-route-finder__all:focus-visible > svg {
    transform: translateX(4px);
}

@media (min-width: 900px) {
    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples {
        grid-auto-rows: minmax(118px, 1fr);
    }
}

@media (max-width: 767px) {
    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a {
        min-height: 104px;
    }
}

html[data-theme="dark"] body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a.tt-route-finder__all {
    border-color: rgba(255, 122, 56, .45);
    background: linear-gradient(145deg, rgba(255, 103, 29, .16), rgba(255, 103, 29, .07));
}

html[data-theme="dark"] body.page-home-redesign .tt-bento__card--find .tt-route-finder__examples > a.tt-route-finder__all small {
    color: #e6b399;
}

html[data-theme="dark"] .tt-route-finder__all > svg {
    stroke: #ff9460;
}

/* The catalogue tile's icon is a black line drawing: tint it with the brand orange. */
.tt-route-finder__all > img {
    filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(346deg) brightness(100%) contrast(106%);
}

/* ================= Phones: the whole block fits in about one screen ================= */
@media (max-width: 767px) {
    .tt-home-tasks {
        padding-top: 20px;
    }

    .tt-home-tasks__head {
        margin-bottom: 12px;
    }

    .tt-home-tasks__head h2 {
        font-size: 22px;
    }

    /* The three cards already say what to do; the sentence above them is repetition. */
    .tt-home-tasks__head p {
        display: none;
    }

    .tt-home-tasks__list.tt-bento {
        gap: 10px;
    }

    .tt-bento__card {
        border-radius: 18px;
        box-shadow: 0 8px 22px rgba(20, 35, 45, .06);
    }

    .tt-bento__card::after,
    .tt-task__art {
        display: none;
    }

    .tt-bento__card .tt-task {
        grid-template-columns: 46px minmax(0, 1fr) 18px;
        gap: 12px;
        padding: 14px;
    }

    .tt-bento__card .tt-task__icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .tt-bento__card .tt-task__icon svg {
        width: 22px;
        height: 22px;
    }

    .tt-bento__card .tt-task__copy {
        gap: 1px;
    }

    .tt-bento__card .tt-task__copy strong {
        font-size: 16px;
    }

    .tt-bento__card .tt-task__copy > span {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 13px;
        line-height: 1.35;
    }

    /* Account and app: two compact tiles side by side instead of two full-width rows. */
    .tt-home-tasks__more {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 10px;
    }

    .tt-home-tasks__more > :only-child {
        grid-column: 1 / -1;
    }

    .tt-home-tasks__chip {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
        border-radius: 16px;
    }

    .tt-home-tasks__chip-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
    }

    .tt-home-tasks__chip-icon svg {
        width: 20px;
        height: 20px;
    }

    .tt-home-tasks__chip strong {
        font-size: 14px;
    }

    .tt-home-tasks__chip small {
        font-size: 12px;
        line-height: 1.3;
    }

    /* AI banner: title, one line of copy and the button. The demo and tags live on the AI page. */
    .tt-ai-banner {
        margin-top: 12px;
    }

    .tt-ai-banner__card {
        gap: 0;
        padding: 18px 16px;
    }

    .tt-ai-banner__copy {
        gap: 6px;
    }

    .tt-ai-banner__copy strong {
        font-size: 21px;
    }

    .tt-ai-banner__text {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 14px;
        line-height: 1.45;
    }

    .tt-ai-banner__tags {
        display: none;
    }

    .tt-ai-banner__cta {
        min-height: 48px;
        margin-top: 10px;
    }
}

@media (max-width: 767px) {
    /* Step label and title are enough on a phone; clipped sentences only add noise. */
    .tt-bento__card .tt-task__copy > span {
        display: none;
    }

    .tt-bento__card .tt-task {
        align-items: center;
        padding: 12px 14px;
    }

    .tt-home-tasks__chip small {
        display: none;
    }

    .tt-home-tasks__chip {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .tt-home-tasks__chip strong {
        font-size: 13.5px;
    }
}
