/* =================================================================
   TODAY (v0.25.9.0, T3) — the teacher's home. Scoped to .tdy,
   shared --as-* tokens only.
   ================================================================= */

.tdy {
    display: grid;
    gap: 16px;
    color: var(--as-ink);
}

.tdy > * { min-width: 0; }

.tdy-hello { margin: 0; display: grid; gap: 2px; }
.tdy-hello strong { font-size: 20px; letter-spacing: -0.01em; }
.tdy-hello span { font-size: var(--as-fs-sm); color: var(--as-ink2); }

.tdy-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.tdy-cols > * { min-width: 0; }

.tdy-h {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--as-ink2);
}

.tdy-count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: var(--as-r-pill, 999px);
    background: var(--as-brand-fill);
    color: var(--as-on-brand);
    font-size: var(--as-fs-xs);
    letter-spacing: 0;
    display: inline-grid;
    place-items: center;
}

.tdy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--as-line-strong);
    border-radius: var(--as-r-ctl, 10px);
    background: var(--as-surface);
    color: var(--as-ink);
    font: inherit;
    font-size: var(--as-fs-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.tdy-btn:hover { background: var(--as-sunk); }
.tdy-btn-primary { background: var(--as-brand-fill); border-color: var(--as-brand-fill); color: var(--as-on-brand); }
.tdy-btn-primary:hover { background: var(--as-brand-fill-hover); }
.tdy-btn:disabled { opacity: 0.55; cursor: default; }
.tdy-btn:focus-visible { outline: 2px solid var(--as-brand); outline-offset: 2px; }

/* ---- Needs you ---- */
.tdy-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--as-surface);
    border: 1px solid var(--as-line);
    border-radius: var(--as-r-card, 16px);
    overflow: hidden;
}

.tdy-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--as-line);
}

.tdy-item:last-child { border-bottom: 0; }

.tdy-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 15px;
    background: var(--as-brand-wash);
    color: var(--as-brand-deep);
}

.tdy-item.is-warn .tdy-icon { background: var(--as-warn-wash); color: var(--as-warn); }

.tdy-text { display: grid; gap: 2px; min-width: 0; }
.tdy-text strong { font-size: 15px; overflow-wrap: anywhere; }
.tdy-text span { font-size: 13px; color: var(--as-ink2); overflow-wrap: anywhere; }

.tdy-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.tdy-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 28px 16px;
    text-align: center;
    color: var(--as-ink2);
    background: var(--as-surface);
    border: 1px solid var(--as-line);
    border-radius: var(--as-r-card, 16px);
}

.tdy-state p { margin: 0; }
.tdy-state.is-error { color: var(--as-no); }
.tdy-state.is-clear { color: var(--as-ok); }
.tdy-state.is-clear > i { font-size: var(--as-fs-2xl); }
.tdy-state.is-clear strong { color: var(--as-ink); }

/* ---- Resume, This week ---- */
.tdy-side { display: grid; gap: 14px; }

.tdy-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    background: var(--as-surface);
    border: 1px solid var(--as-line);
    border-radius: var(--as-r-card, 16px);
}

.tdy-card > .tdy-btn { justify-self: start; margin-top: 4px; }
.tdy-resume { border-color: var(--as-brand); box-shadow: inset 4px 0 0 var(--as-brand); }
.tdy-resume.is-empty { border-color: var(--as-line); box-shadow: none; color: var(--as-ink2); }
.tdy-resume strong { font-size: var(--as-fs-md); }
.tdy-resume > span:not(.tdy-eyebrow) { font-size: 13px; color: var(--as-ink2); }

.tdy-eyebrow {
    margin: 0;
    font-size: var(--as-fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--as-ink3);
}

.tdy-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--as-fs-sm); }
.tdy-recent span { display: block; font-size: 12.5px; color: var(--as-ink3); }

.tdy-reason-label { display: block; margin: 12px 0 6px; font-weight: 600; }
.tdy-reason { width: 100%; box-sizing: border-box; resize: vertical; }

/* ---- Phone ---- */
@media (max-width: 760px) {
    /* One column: a lesson to resume first (on a phone it is the likeliest
       tap), then Needs you, then the rest. */
    .tdy-cols { display: flex; flex-direction: column; }
    .tdy-side { display: contents; }
    #tdyResume { order: 2; }
    #tdyResume.is-live { order: -1; }
    #tdyRecent { order: 3; }
}

@media (max-width: 600px) {
    .tdy-item { grid-template-columns: auto minmax(0, 1fr); }
    .tdy-actions { grid-column: 2; justify-content: flex-start; }
    .tdy-btn { min-height: 44px; }
}
