/* Mentor Studio — dashboard v2 */

/* The whole sheet runs on these seven, so the dashboard takes the site's
   colours by swapping them and nothing else. The warm paper and the near-black
   ink were a palette of their own; these are the ones the landing page uses. */
.studio-page {
    --paper: #F3F1FB;
    --paper-2: #FFFFFF;
    --ink: #2B1B4E;
    --ink-soft: #6B6484;
    --line: rgba(43, 27, 78, .1);
    /* The accent the whole site now uses. Kept under the name the rest of
       this file already refers to, so one definition moves everything. */
    --violet: #3BA9F4;
    --lilac: #DDD6FA;
    /* What used to be clay: the colour the site marks weak spots and actions
       with. */
    --clay: #FF6B35;
    --sky: #3BA9F4;

    /* The rest of the signed-in side paints with the names app.css declares,
       and those are built for a dark shell. Repointing them here means a page
       only has to carry this class to come out light — it does not have to be
       rewritten. */
    --shell: #F3F1FB;
    --shell-deep: #EDEAF8;
    --shell-line: rgba(43, 27, 78, .08);
    --shell-hover: rgba(43, 27, 78, .05);

    --on-shell: #2B1B4E;
    --on-shell-muted: #6B6484;
    /* Not as faint as it was on the dark shell. The small section labels use
       this, and at #9A93AE on this paper they came out at 1.6:1 — present on
       the screen and unreadable. */
    --on-shell-faint: #6F688A;

    --card: #FFFFFF;
    --card-raised: #FFFFFF;
    --card-sunken: #F3F1FB;
    --card-line: rgba(43, 27, 78, .09);

    --ink-muted: #6B6484;
    --ink-faint: #6F688A;

    background: var(--paper);
    color: var(--ink);
}

/* The bar, built like the one on the site: white and glassy over the page,
   quiet links, and the way out as the orange pill every other call to action
   on the site already is. */
.studio-page .nav {
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(43, 27, 78, .07);
    backdrop-filter: blur(12px);
    color: var(--ink);
}

.studio-page .nav__brand,
.studio-page .nav__link,
.studio-page .nav__icon,
.studio-page .nav__learner { color: var(--ink-soft); }

/* The site marks the page you are on with a rule under the word rather than
   with a filled block, so this does too. */
.studio-page .nav__link[aria-current="page"] {
    background: transparent;
    color: var(--violet);
    box-shadow: inset 0 -2px 0 var(--violet);
    border-radius: 0;
}

.studio-page .nav__icon[aria-current="page"] {
    background: var(--lilac);
    color: var(--violet);
}

.studio-page .nav__avatar { background: var(--ink); color: var(--paper); }

.studio-page .nav__link:hover,
.studio-page .nav__icon:hover,
.studio-page .nav__learner:hover { background: rgba(43, 27, 78, .05); }

/* The way out, in the site's action colour. */
.studio-page .btn--ghost {
    border: 0;
    border-radius: 999px;
    /* The bar is full at this width; the pill keeps the small button's size
       so it does not push the row past the edge. */
    padding: 8px 15px;
    background: var(--clay);
    color: #fff;
    font-weight: 650;
    box-shadow: 0 8px 20px rgba(255, 107, 53, .28);
    transition: transform .22s cubic-bezier(.2, .8, .3, 1), box-shadow .22s ease;
}

.studio-page .btn--ghost:hover:not(:disabled) {
    background: var(--clay);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(255, 107, 53, .36);
}

.studio-page .btn--ghost:active:not(:disabled) {
    transform: translateY(1px) scale(.97);
    box-shadow: 0 4px 10px rgba(255, 107, 53, .3);
    transition-duration: .07s;
}

@media (prefers-reduced-motion: reduce) {
    .studio-page .btn--ghost:hover:not(:disabled),
    .studio-page .btn--ghost:active:not(:disabled) { transform: none; }
}

.studio {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 28px 80px;
    display: grid;
    gap: 22px;
    font-family: 'Outfit', sans-serif;
    animation: studio-in .65s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes studio-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.studio__hero {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) minmax(220px, 280px);
    gap: 18px;
    align-items: stretch;
}

.studio__portrait {
    position: relative;
    background: var(--lilac);
    border-radius: 28px;
    overflow: hidden;
    height: 320px;
    animation: studio-bob 4.8s ease-in-out infinite;
}

.studio__mount {
    position: absolute;
    inset: 0;
}

.studio__portrait img,
.studio__portrait canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 14%;
}

.studio__portrait canvas {
    animation: studio-rise .85s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes studio-rise {
    from { opacity: 0; transform: translateY(20px) scale(1.03); }
    to { opacity: 1; transform: none; }
}

@keyframes studio-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.studio__welcome {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 4px;
}

.studio__hello {
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 10px;
}

.studio__welcome h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(32px, 4.4vw, 52px);
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.02;
    margin: 0 0 12px;
}

.studio__lede {
    color: var(--ink-soft);
    font-size: 16px;
    max-width: 38ch;
    line-height: 1.5;
    margin: 0 0 22px;
}

.studio__stage-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.studio__textlink {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.studio__textlink:hover { color: var(--ink); }

.studio__next {
    background: var(--ink);
    color: var(--paper);
    border-radius: 28px;
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
}

.studio__next .studio__label { color: rgba(237, 230, 216, .5); }
.studio__next h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -.03em;
    line-height: 1.05;
    margin: 8px 0 10px;
}
.studio__next p { font-size: 14px; opacity: .7; margin: 0 0 16px; }
.studio__next .studio__btn { margin-top: auto; align-self: flex-start; }
.studio__next .studio__streak { margin: 16px 0 0; color: rgba(237, 230, 216, .55); }

.studio__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.22, 1, .36, 1);
}

.studio__btn:hover { transform: translateY(-2px); }
.studio__btn:active { transform: translateY(0) scale(.98); }
.studio__btn--light { background: var(--ink); color: var(--paper); }
.studio__btn--ghost {
    background: transparent;
    color: inherit;
    box-shadow: inset 0 0 0 1px var(--line);
}

.studio__label {
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.studio__label--block { margin-bottom: 12px; display: block; }

.studio__num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 40px;
    font-weight: 650;
    letter-spacing: -.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.studio__num--sm { font-size: 32px; }

.studio__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.studio__stat {
    background: var(--paper-2);
    border-radius: 22px;
    padding: 20px 22px;
}

.studio__stat .studio__num { margin: 10px 0 14px; }

.studio__track {
    height: 6px;
    border-radius: 999px;
    background: rgba(27, 24, 20, .08);
    overflow: hidden;
}

.studio__track span {
    display: block;
    height: 100%;
    width: var(--w, 0);
    border-radius: inherit;
    background: var(--violet);
    transform: scaleX(0);
    transform-origin: left;
    animation: studio-bar .85s cubic-bezier(.22, 1, .36, 1) .2s forwards;
}

.studio__track--warm span { background: var(--clay); }

@keyframes studio-bar {
    to { transform: scaleX(1); }
}

.studio__hint { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.studio__hint--link { color: var(--violet); text-decoration: none; font-weight: 600; }

.studio__split {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 14px;
}

.studio__week,
.studio__acc,
.studio__log,
.studio__empty {
    background: var(--paper-2);
    border-radius: 22px;
    padding: 22px 24px;
}

.studio__rowhead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.studio__rowhead a {
    color: var(--violet);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.studio__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    height: 140px;
}

.studio__day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.studio__day-track {
    flex: 1;
    width: 100%;
    max-width: 36px;
    background: rgba(27, 24, 20, .06);
    border-radius: 999px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.studio__day-track span {
    display: block;
    width: 100%;
    height: var(--h, 8%);
    background: rgba(27, 24, 20, .16);
    border-radius: inherit;
    transform: scaleY(0);
    transform-origin: bottom;
    animation: studio-grow .7s cubic-bezier(.22, 1, .36, 1) forwards;
    animation-delay: calc(.15s + var(--i, 0) * .05s);
}

.studio__day-track span.is-on { background: var(--sky); }

@keyframes studio-grow {
    to { transform: scaleY(1); }
}

.studio__day b { font-size: 12px; font-variant-numeric: tabular-nums; }
.studio__day span { font-size: 12px; color: var(--ink-soft); }

.studio__acc-row + .studio__acc-row { margin-top: 16px; }
.studio__acc-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 6px;
}

.studio__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.studio__card,
.studio .material-card {
    background: var(--paper-2);
    color: var(--ink);
    border-radius: 20px;
    padding: 20px;
}

.studio__card h3,
.studio .material-card__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -.02em;
}

.studio__card p { font-size: 14px; color: var(--ink-soft); margin: 8px 0 16px; }
.studio .material-card { transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.studio .material-card:hover { transform: translateY(-3px); }

.studio__empty h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    margin: 6px 0 8px;
}
.studio__empty p { color: var(--ink-soft); max-width: 42ch; }
.studio__empty-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.studio__log-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.studio__log-row:last-child { border-bottom: 0; padding-bottom: 0; }
.studio__log-row strong { display: block; font-weight: 600; }
.studio__log-row span { font-size: 13px; color: var(--ink-soft); }
.studio__log-row em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.studio__streak {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio__streak.is-on span {
    color: var(--lilac);
    display: inline-block;
    animation: studio-spin 6s linear infinite;
}

@keyframes studio-spin { to { transform: rotate(360deg); } }

.studio-page .alert {
    margin: 0 0 8px;
}

@media (max-width: 980px) {
    .studio__hero { grid-template-columns: 1fr; }
    .studio__portrait { height: 260px; max-width: 280px; }
    .studio__split,
    .studio__stats { grid-template-columns: 1fr; }
    .studio { padding: 20px 16px 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .studio,
    .studio__portrait,
    .studio__portrait canvas,
    .studio__track span,
    .studio__day-track span,
    .studio__streak.is-on span { animation: none !important; }
    .studio__track span,
    .studio__day-track span { transform: none; }
}


/* ------------------------------------------------------------- footer -- */

/* The dashboard's own colours, since it carries a palette of its own. */
.studio-page .appfoot {
    border-top-color: var(--line);
    background: var(--paper);
}

.studio-page .appfoot p { color: var(--ink-soft); }
.studio-page .appfoot p.appfoot__head { color: var(--clay); }
.studio-page .appfoot a { color: var(--ink-soft); }
.studio-page .appfoot a:hover { color: var(--violet); }
.studio-page .appfoot__copy { color: var(--ink-soft); opacity: .8; }

.studio-page .appfoot p.appfoot__by a { color: var(--ink); }


/* ---------------------------------------------------- the coach picker -- */

/* The picker shows the same faces the home page does. Its own rule sized the
   picture as a 96x104 box, which the disc treatment does not want: the frame
   is the disc, and the figure stands out of it. */
.studio-page .coach-option .face {
    width: 104px;
    max-width: 104px;
    margin-bottom: 10px;
}

.studio-page .coach-option .face img {
    width: auto;
    height: 125%;
    margin-bottom: 0;
    object-fit: contain;
}

.studio-page .coach-option {
    background: var(--paper-2);
    border-color: transparent;
}

.studio-page .coach-option:has(input:checked) {
    border-color: var(--sky);
    background: var(--paper-2);
}

.studio-page .coach-option__name { color: var(--ink); font-weight: 650; }
.studio-page .coach-option__persona { color: var(--ink-soft); }


/* ========================================================================== */
/* The parent's dashboard                                                     */
/* ========================================================================== */
/* A different screen from the child's, because the parent does a different
   thing: they watch and they pay. Same paper and cards, no coach and no
   greeting — nobody is being taught here. */

.parent__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.parent__kicker {
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--clay);
    margin: 0 0 8px;
}

.parent h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 650;
    letter-spacing: -.03em;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.1;
    margin: 0 0 10px;
}

.parent__lead {
    color: var(--ink-soft);
    max-width: 56ch;
    margin: 0;
}

.parent__children {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.parent__child {
    background: var(--paper-2);
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: 0 12px 30px rgba(43, 27, 78, .06);
}

.parent__child header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.parent__child h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 650;
    font-size: 22px;
    margin: 0;
}

.parent__when { color: var(--ink-soft); font-size: 13px; }

.parent__figures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 0 18px;
}

.parent__figures dt {
    color: var(--ink-soft);
    font-size: 12px;
    margin-bottom: 4px;
}

.parent__figures dd {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.parent__figures .is-warn dd { color: var(--clay); }

.parent__trouble {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--paper);
    margin-bottom: 18px;
}

.parent__trouble p {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--ink-soft);
}

.parent__trouble ul { margin: 0; padding-left: 18px; font-size: 14px; }

.parent__child footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.parent__due { color: var(--clay); font-size: 13px; font-weight: 600; }

.parent__row {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-top: 26px;
}

.parent__panel {
    background: var(--paper-2);
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: 0 12px 30px rgba(43, 27, 78, .06);
}

.parent__panel h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 650;
    font-size: 19px;
    margin: 0 0 14px;
}

.parent__none, .parent__soon { color: var(--ink-soft); font-size: 14px; margin: 0; }

.parent__flags { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }

.parent__flags li {
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--paper);
    font-size: 14px;
}

.parent__flags li.is-urgent { background: rgba(179, 38, 30, .1); }

.parent__more { color: var(--violet); font-weight: 650; text-decoration: none; font-size: 14px; }

.parent__amount {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 8px;
}

.parent__amount span {
    display: block;
    font-family: Outfit, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--ink-soft);
    margin-top: 6px;
}

.parent__billnote { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }

.parent__empty {
    background: var(--paper-2);
    border-radius: 22px;
    padding: 40px 28px;
    text-align: center;
    margin-top: 26px;
    box-shadow: 0 12px 30px rgba(43, 27, 78, .06);
}

.parent__empty h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 650; margin: 0 0 8px; }
.parent__empty p { color: var(--ink-soft); margin: 0 0 20px; }

@media (max-width: 900px) {
    .parent__row { grid-template-columns: 1fr; }
    .parent__figures { grid-template-columns: repeat(2, 1fr); }
}
