/*
 * Home page "Try it here" (D-064) — [aphasia_home], includes/class-home-page.php.
 * Mobile-first; 768px is the desktop step. Colours: green = act, gold = Premium,
 * light blue = Workbook Club, skill-bucket tints match the hub (practice-home.css).
 */
.ash-root {
    --ash-ink: #1e262c;
    --ash-ink-2: #3d474f;
    --ash-muted: #556069;
    --ash-line: #cbd5e0;
    --ash-band: #f2f6f4;
    --ash-green: #158a4c;
    --ash-green-edge: #1a9d57;
    --ash-green-soft: #dff1e6;
    --ash-green-ink: #0f6b3c;
    --ash-gold: #e9b949;
    --ash-gold-edge: #b07d10;
    --ash-gold-soft: #f6ead0;
    --ash-gold-ink: #6b4a05;
    --ash-club: #4dd2ff;
    --ash-club-soft: #e6f8ff;
    --ash-club-ink: #0b5c78;
    --ash-learn: #0f6b73;
    --ash-display: "Baloo 2", "Atkinson Hyperlegible", system-ui, sans-serif;
    font-family: "Atkinson Hyperlegible", system-ui, "Segoe UI", sans-serif;
    color: var(--ash-ink);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.ash-root *,
.ash-root *::before,
.ash-root *::after { box-sizing: border-box; }
.ash-root a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ash-root a:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }

/* ── 1. Hero ─────────────────────────────────────────────── */
.ash-hero {
    background: var(--ash-band);
    border-radius: 24px;
    padding: 18px 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ash-hero-text { display: contents; }
.ash-h1 {
    order: 1;
    margin: 0;
    font-family: var(--ash-display);
    font-weight: 800;
    font-size: 36px;
    line-height: 1.05;
    color: var(--ash-ink);
}
.ash-sub { display: none; margin: 0; font-size: 22px; line-height: 1.35; color: var(--ash-ink-2); }
.ash-card-col, .ash-card-door { order: 2; }
.ash-card-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ash-nosignup {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 19px;
    font-weight: 700;
    color: var(--ash-ink-2);
}
.ash-check { flex: none; color: var(--ash-green); width: 22px; height: 22px; }
.ash-learn {
    order: 3;
    align-self: flex-start;
    font-size: 17px;
    font-weight: 700;
    color: var(--ash-learn);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* The card */
.ash-card {
    position: relative;
    background: #ffffff;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 2px 4px rgba(30, 38, 44, .06), 0 14px 34px rgba(30, 38, 44, .12);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ash-play { display: flex; flex-direction: column; gap: 10px; }
.ash-pips { display: flex; align-items: center; gap: 4px; }
.ash-pips span { flex: 0 1 22px; min-width: 6px; height: 7px; border-radius: 999px; background: #e3e8eb; }
.ash-pips span.is-done { background: var(--ash-green-edge); }
.ash-pips span.is-on { background: var(--ash-green-ink); }
.ash-pips b { margin-left: auto; padding-left: 8px; white-space: nowrap; font-weight: 400; font-size: 15px; color: var(--ash-muted); }
.ash-prompt {
    margin: 0;
    font-family: var(--ash-display);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.15;
}
.ash-prompt-sub { margin: -8px 0 0; font-size: 16px; color: var(--ash-muted); }
.ash-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 46 / 30;
    object-fit: cover;
    border-radius: 14px;
    background: #faf8f4;
}
.ash-photo.is-pulse { animation: ash-pulse .35s ease; }
@keyframes ash-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(21, 138, 76, 0); }
    50% { box-shadow: 0 0 0 5px rgba(21, 138, 76, .35); }
}
.ash-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ash-root .ash-choice {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    margin: 0;
    padding: 0 8px;
    cursor: pointer;
    line-height: 1.1;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--ash-line);
    border-radius: 16px;
    background: #ffffff;
    font-family: var(--ash-display);
    font-weight: 700;
    font-size: 28px;
    color: var(--ash-ink);
    text-decoration: none;
    transition: border-color .12s ease, transform .12s ease;
}
.ash-root .ash-choice:hover { border-color: var(--ash-green-edge); background: #ffffff; color: var(--ash-ink); }
.ash-root .ash-choice:active { transform: scale(.98); border-color: var(--ash-green); }
.ash-root .ash-choice:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.ash-root .ash-choice:disabled { cursor: default; transform: none; }
/* Theme button styles (hover/focus/disabled) must not thin or recolour the frame. */
.ash-root .ash-choices .ash-choice,
.ash-root .ash-choices .ash-choice:hover,
.ash-root .ash-choices .ash-choice:focus,
.ash-root .ash-choices .ash-choice:disabled { border-width: 3px; border-style: solid; border-radius: 16px; box-shadow: none; opacity: 1; }
.ash-root .ash-choice.is-right { border-color: var(--ash-green); background: var(--ash-green-soft); color: var(--ash-green-ink); }
.ash-root .ash-choice.is-right::before { content: "✓"; margin-right: 8px; }
.ash-root .ash-choice.is-wrong { border-color: #dc2626; background: #fdeded; color: #a61b1b; }
.ash-root .ash-choice.is-wrong::before { content: "✗"; margin-right: 8px; }
.ash-root .ash-choice.is-glow { border-color: var(--ash-green); animation: ash-glow 1s ease 2; }
@keyframes ash-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(21, 138, 76, 0); }
    50% { box-shadow: 0 0 0 6px rgba(21, 138, 76, .3); }
}
.ash-hint-out {
    margin: 0;
    min-height: 26px;
    line-height: 26px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #8a4b05;
}
.ash-root .ash-hint {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    background: #fffbeb;
    border: 2px solid #fbbf24;
    color: #8a4b05;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
}
.ash-root .ash-hint svg { color: #b45309; }
.ash-card-door { align-items: stretch; gap: 14px; padding: 20px; }

/* After card 10: laid over the play area so the frame never changes size. */
.ash-card.is-done .ash-play { visibility: hidden; }
.ash-done {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    text-align: center;
}
.ash-done[hidden] { display: none; }
.ash-done-mark { margin: 0; font-size: 52px; line-height: 1; }
.ash-root .ash-done-title {
    margin: 0;
    font-family: var(--ash-display);
    font-weight: 800;
    font-size: 36px;
    line-height: 1.05;
    color: var(--ash-ink);
}
.ash-done-title:focus { outline: none; }
.ash-done-sub { margin: 0 0 6px; font-size: 20px; color: var(--ash-ink-2); }
.ash-done-why { margin: 0; font-size: 17px; color: var(--ash-muted); }
.ash-root .ash-done-more {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    color: var(--ash-green-ink);
}

/* ── Buttons ─────────────────────────────────────────────── */
.ash-root .ash-btn {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}
.ash-root .ash-btn-green { background: var(--ash-green); color: #ffffff; }
.ash-root .ash-btn-green:hover { background: var(--ash-green-ink); color: #ffffff; }
.ash-root .ash-btn-gold { background: var(--ash-gold); color: var(--ash-ink); }
.ash-root .ash-btn-gold:hover { background: #ddb03f; color: var(--ash-ink); }
.ash-root .ash-btn-big { min-height: 72px; font-size: 24px; }

/* ── 2. Plans ────────────────────────────────────────────── */
.ash-plans, .ash-more { display: flex; flex-direction: column; gap: 14px; padding: 0 4px; }
.ash-h2 {
    margin: 0;
    font-family: var(--ash-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.1;
    color: var(--ash-ink);
}
.ash-plan-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.ash-plan {
    border: 3px solid var(--ash-green-edge);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
}
.ash-plan-premium { border-color: var(--ash-gold-edge); }
.ash-plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ash-plan-head h3 { margin: 0; font-size: 23px; font-weight: 700; color: var(--ash-ink); }
.ash-tag { font-size: 15px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ash-tag-green { background: var(--ash-green-soft); color: var(--ash-green-ink); }
.ash-tag-gold { background: var(--ash-gold-soft); color: var(--ash-gold-ink); }
.ash-price { margin: 0; font-size: 38px; font-weight: 700; line-height: 1; color: var(--ash-ink); }
.ash-price small { font-size: 17px; font-weight: 700; color: var(--ash-muted); }
.ash-list { margin: 0 0 4px; padding-left: 22px; font-size: 18px; line-height: 1.55; color: var(--ash-ink-2); }
.ash-list li { margin: 0; }
.ash-plan .ash-btn { margin-top: auto; }
.ash-root .ash-yearly {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--ash-green-ink);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ash-root .ash-club {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    background: var(--ash-club-soft);
    border: 2px solid var(--ash-club);
    color: var(--ash-ink);
    text-decoration: none;
}
.ash-club img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.ash-club-text { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--ash-ink-2); }
.ash-club-text b { font-size: 18px; color: var(--ash-ink); }
.ash-club-go { font-size: 17px; font-weight: 700; color: var(--ash-club-ink); }

/* ── 3. Join free for more exercises ─────────────────────── */
.ash-more-sub { margin: -8px 0 0; font-size: 18px; color: var(--ash-ink-2); }
.ash-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ash-root .ash-tile {
    --sk: #2563eb; --sk-ink: #1d4ed8; --sk-bg: #ebf2fe;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    min-height: 44px;
    border-radius: 16px;
    background: var(--sk-bg);
    border: 2px solid var(--sk);
    color: var(--ash-ink);
    text-decoration: none;
}
.ash-root .ash-sk-speaking  { --sk: #7c3aed; --sk-ink: #6d28d9; --sk-bg: #f5f0ff; }
.ash-root .ash-sk-listening { --sk: #d97706; --sk-ink: #8a4b05; --sk-bg: #fef6e7; }
.ash-root .ash-sk-reading   { --sk: #2563eb; --sk-ink: #1d4ed8; --sk-bg: #ebf2fe; }
.ash-root .ash-sk-writing   { --sk: #dc2626; --sk-ink: #a61b1b; --sk-bg: #fdeded; }
.ash-root .ash-sk-everyday  { --sk: #059669; --sk-ink: #047857; --sk-bg: #e8f6ef; }
.ash-root .ash-sk-thinking  { --sk: #db2777; --sk-ink: #a8165a; --sk-bg: #fdebf3; }
.ash-tile-emoji { font-size: 30px; line-height: 1; }
.ash-tile-text { display: flex; flex-direction: column; gap: 2px; }
.ash-tile-text b { font-size: 19px; }
.ash-tile-text span { font-size: 15px; color: var(--sk-ink); }
.ash-root .ash-btn-inline { align-self: stretch; }

/* ── 4. Made by ──────────────────────────────────────────── */
.ash-made {
    background: #f6f8f9;
    border-radius: 18px;
    padding: 20px 16px;
}
.ash-made p { margin: 0; font-size: 19px; font-weight: 700; }

/* ── Desktop ─────────────────────────────────────────────── */
@media (min-width: 768px) {
    .ash-root { padding: 0 24px 40px; gap: 52px; }
    .ash-hero {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 48px;
        padding: 48px 44px;
        border-radius: 32px;
    }
    .ash-hero-text {
        display: flex;
        flex: 1 1 380px;
        min-width: 0;
        flex-direction: column;
        gap: 20px;
    }
    /* The phone order (title, card, checks, link) only applies inside the band;
       on desktop the text column keeps source order beside the card. */
    .ash-hero-text > * { order: 0; }
    .ash-h1 { font-size: 64px; line-height: 1.0; }
    .ash-sub { display: block; }
    .ash-learn { font-size: 19px; }
    .ash-card-col, .ash-card-door { flex: 0 1 440px; min-width: 0; }
    .ash-card { padding: 22px; gap: 14px; border-radius: 28px; }
    .ash-play { gap: 14px; }
    .ash-nosignup { font-size: 20px; }
    .ash-pips span { width: 28px; height: 8px; }
    .ash-prompt { font-size: 30px; }
    .ash-prompt-sub { font-size: 18px; }
    .ash-photo { border-radius: 18px; }
    .ash-choices { gap: 14px; }
    .ash-root .ash-choice { min-height: 78px; font-size: 34px; border-radius: 18px; }
    .ash-root .ash-choices .ash-choice,
    .ash-root .ash-choices .ash-choice:hover,
    .ash-root .ash-choices .ash-choice:focus,
    .ash-root .ash-choices .ash-choice:disabled { border-radius: 18px; }
    .ash-h2 { font-size: 38px; }
    .ash-plans, .ash-more { gap: 20px; padding: 0; }
    .ash-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .ash-plan { padding: 26px; border-radius: 22px; gap: 12px; }
    .ash-plan-head h3 { font-size: 26px; }
    .ash-price { font-size: 44px; }
    .ash-list { font-size: 19px; }
    .ash-root .ash-club { padding: 16px 22px; gap: 20px; }
    .ash-club img { width: 92px; height: 70px; border-radius: 10px; }
    .ash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    .ash-root .ash-tile { flex-direction: row; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; }
    .ash-tile-emoji { font-size: 34px; }
    .ash-tile-text b { font-size: 21px; }
    .ash-tile-text span { font-size: 16px; }
    .ash-root .ash-btn-inline { align-self: flex-start; min-height: 62px; font-size: 22px; padding: 0 34px; }
    .ash-made { padding: 28px 32px; }
    .ash-made p { font-size: 22px; }
}

@media (max-width: 380px) {
    .ash-h1 { font-size: 32px; }
    .ash-root .ash-choice { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .ash-root .ash-choice { transition: none; }
    .ash-root .ash-choice:active { transform: none; }
    .ash-photo.is-pulse,
    .ash-root .ash-choice.is-glow { animation: none; }
}
