/*
 * Today's Trivia — the daily auto-built game.
 *
 * Two surfaces share this sheet:
 *   .t1-daily-card  the entry card, included on the home page and above the
 *                   /host builder. It has to sit inside BOTH layouts.trivia
 *                   (dark marketing chrome) and layouts.account (the console),
 *                   so it carries its own background and border rather than
 *                   inheriting a card style that differs between the two.
 *   .t1-daily-page  the /daily landing page.
 *
 * Everything is namespaced t1-daily-* on purpose — this file is loaded into
 * pages owned by other people's features and must not reach outside itself.
 * Colours match the app's existing indigo/slate palette (see trivia-app.css).
 */

/* ------------------------------------------------------------------ */
/* Shared bits                                                         */
/* ------------------------------------------------------------------ */

.t1-daily-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.t1-daily-badges {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.t1-daily-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(99, 102, 241, 0.1);
    font-size: 0.78rem;
    opacity: 0.9;
}

.t1-daily-badge span {
    font-weight: 700;
    color: #a5b4fc;
}

.t1-daily-btn-ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: inherit;
}

/* ------------------------------------------------------------------ */
/* The entry card (home page + /host)                                  */
/* ------------------------------------------------------------------ */

.t1-daily-card {
    position: relative;
    border: 1px solid rgba(129, 140, 248, 0.38);
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(168, 85, 247, 0.07));
    padding: 1.35rem 1.4rem;
    margin: 0 0 1.5rem;
    /* The card is the "or" branch next to a big primary action, so it gets a
       soft lift rather than shouting — it should read as an alternative, not
       as a competing CTA. */
    box-shadow: 0 12px 30px -18px rgba(99, 102, 241, 0.75);
}

.t1-daily-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.t1-daily-card-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.t1-daily-count {
    flex: none;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.t1-daily-card-blurb {
    margin: 0.7rem 0 0;
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.88;
}

.t1-daily-card-actions {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.t1-daily-play-form {
    margin: 0;
}

.t1-daily-play-btn {
    white-space: nowrap;
}

.t1-daily-peek-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #a5b4fc;
    text-decoration: none;
}

.t1-daily-peek-link:hover {
    text-decoration: underline;
}

.t1-daily-card-note {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    opacity: 0.7;
}

.t1-daily-card-compact {
    padding: 1rem 1.1rem;
}

.t1-daily-card-compact .t1-daily-card-title {
    font-size: 1.12rem;
}

/* ------------------------------------------------------------------ */
/* /daily landing page                                                 */
/* ------------------------------------------------------------------ */

.t1-daily-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
    width: 100%;
}

.t1-daily-flash {
    margin-bottom: 1.5rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.12);
    font-size: 0.94rem;
}

.t1-daily-hero {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.75rem 1.5rem;
}

.t1-daily-title {
    margin: 0;
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
}

.t1-daily-lead {
    margin: 0.8rem 0 0;
    font-size: 1.02rem;
    line-height: 1.6;
    opacity: 0.86;
}

.t1-daily-stale {
    margin: 1rem 0 0;
    padding: 0.6rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t1-daily-facts {
    margin: 1.4rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.t1-daily-facts > div {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.35);
    padding: 0.7rem 0.8rem;
}

.t1-daily-facts dt {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.62;
}

.t1-daily-facts dd {
    margin: 0.2rem 0 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.t1-daily-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.t1-daily-actions form {
    margin: 0;
}

.t1-daily-note {
    margin: 1rem 0 0;
    font-size: 0.86rem;
    line-height: 1.55;
    opacity: 0.7;
}

/* ---- Sample question -------------------------------------------- */

.t1-daily-sample {
    margin-top: 1.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
}

.t1-daily-sample-head {
    margin-bottom: 1rem;
}

.t1-daily-sample-sub {
    margin: 0;
    font-size: 0.88rem;
    opacity: 0.72;
}

.t1-daily-sample-q {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.45;
}

.t1-daily-choices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.t1-daily-choice {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.4);
    color: inherit;
    font: inherit;
    font-size: 0.98rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.t1-daily-choice:hover:not([disabled]) {
    border-color: rgba(129, 140, 248, 0.6);
    background: rgba(99, 102, 241, 0.12);
}

.t1-daily-choice[disabled] {
    cursor: default;
}

.t1-daily-choice-letter {
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(99, 102, 241, 0.22);
    font-weight: 800;
    font-size: 0.85rem;
}

/* Answer states. Set by daily-trivia.js after a pick; deliberately not
   colour-only — the icon in .t1-daily-verdict carries the same meaning for
   anyone who can't distinguish the two. */
.t1-daily-choice.is-correct {
    border-color: rgba(16, 185, 129, 0.75);
    background: rgba(16, 185, 129, 0.16);
}

.t1-daily-choice.is-wrong {
    border-color: rgba(244, 63, 94, 0.7);
    background: rgba(244, 63, 94, 0.14);
}

.t1-daily-verdict {
    margin: 1rem 0 0;
    min-height: 1.4em;
    font-size: 0.95rem;
    font-weight: 700;
}

.t1-daily-verdict[data-kind="correct"] { color: #6ee7b7; }
.t1-daily-verdict[data-kind="wrong"]   { color: #fda4af; }

/* No-JS fallback. daily-trivia.js hides this once it takes over, so the
   answer is never sitting in an open <details> next to a live quiz. */
.t1-daily-fallback {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.t1-daily-fallback summary {
    cursor: pointer;
}

.t1-daily-sample-cat {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ---- How it works ------------------------------------------------ */

.t1-daily-how {
    margin-top: 1.75rem;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
}

.t1-daily-how h2 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
}

.t1-daily-how ol {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.85rem;
}

.t1-daily-how li {
    line-height: 1.6;
    opacity: 0.88;
    font-size: 0.95rem;
}

.t1-daily-how-foot {
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    opacity: 0.78;
}

.t1-daily-how-foot a,
.t1-daily-how a {
    color: #a5b4fc;
}

/* ------------------------------------------------------------------ */
/* Narrow screens                                                      */
/* ------------------------------------------------------------------ */

@media (max-width: 560px) {
    .t1-daily-card-head {
        flex-direction: column;
        gap: 0.5rem;
    }

    .t1-daily-facts {
        grid-template-columns: 1fr;
    }

    /* Full-width stacked CTAs — a half-width primary button next to a
       half-width ghost one is a mis-tap waiting to happen on a phone. */
    .t1-daily-actions,
    .t1-daily-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .t1-daily-actions form,
    .t1-daily-card-actions form,
    .t1-daily-actions .trivia1-btn,
    .t1-daily-card-actions .trivia1-btn {
        width: 100%;
    }

    .t1-daily-peek-link {
        justify-content: center;
    }
}
