/* GuideMate Brain card (brain-deck.mjs): four faces stacked in one place, so the
   card never changes height as it turns; the current one fades in. */
.gm-brain-deck { position: relative; }
.gm-brain-slides { display: grid; width: 100%; }
.gm-brain-slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.gm-brain-deck.is-deck .gm-brain-slide {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.gm-brain-deck.is-deck .gm-brain-slide.is-current {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .45s ease, transform .45s ease, visibility 0s;
}
/* The face's action is a button where it opens a task: bare text and an arrow, like the link. */
.gm-brain-slide button.gm-agent-run {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}
.gm-brain-dots { display: flex; gap: 8px; margin-top: 12px; }
.gm-brain-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 1.5px solid var(--gm-gold-ink);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.gm-brain-dots button[aria-pressed="true"] { background: var(--gm-gold-ink); }
.gm-brain-dots button:focus-visible { outline: 2px solid var(--gm-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .gm-brain-deck.is-deck .gm-brain-slide,
    .gm-brain-deck.is-deck .gm-brain-slide.is-current { transition: none; transform: none; }
}

/* ── The task dialog: Get me to a 7, Night before ── */
.gm-brain-dialog {
    width: min(880px, calc(100vw - 48px));
    max-height: calc(100vh - 64px);
    margin: auto; /* the site reset zeroes margins, which pins a modal dialog to the corner */
    padding: 0;
    border: 1.5px solid var(--gm-paper-ink, var(--gm-ink));
    border-radius: var(--gm-radius-card, 16px);
    background: var(--gm-surface);
    color: var(--gm-ink);
    box-shadow: var(--gm-shadow-pop);
    font-family: var(--gm-font);
}
.gm-brain-dialog::backdrop { background: rgba(13, 29, 54, .38); }
.gm-brain-dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 32px 40px 10px;
}
.gm-brain-dialog-title { margin: 4px 0 0; font: 700 1.75rem/1.2 var(--gm-display); text-wrap: balance; }
.gm-brain-dialog-close {
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--gm-ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.gm-brain-dialog-body { padding: 14px 40px 36px; overflow-y: auto; }
.gm-brain-lede { margin: 0 0 22px; font-size: 1rem; line-height: 1.6; color: var(--gm-ink-2, var(--gm-ink)); }
.gm-brain-note { display: block; margin: 0; font-size: .84rem; line-height: 1.5; color: var(--gm-muted); }
.gm-brain-cost { margin: 30px 0 0; font-size: .8rem; color: var(--gm-muted); }

/* Subject choice: text that is underlined in gold when chosen (no boxes). */
.gm-brain-subjects { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 6px 0 32px; padding-bottom: 26px; border-bottom: 1px solid var(--gm-line); }
.gm-brain-chip {
    padding: 4px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--gm-ink);
    font: 600 .96rem/1.4 var(--gm-font);
    text-align: left;
    cursor: pointer;
}
.gm-brain-chip:hover { border-bottom-color: var(--gm-line-strong); }
.gm-brain-chip[aria-pressed="true"] { border-bottom-color: var(--gm-gold); color: var(--gm-gold-ink); }

.gm-brain-grade { display: flex; align-items: baseline; gap: 16px; margin: 4px 0 14px; }
.gm-brain-grade strong { font: 700 3.6rem/1 var(--gm-display); color: var(--gm-ink); }
.gm-brain-grade span { font-size: .88rem; color: var(--gm-muted); }
.gm-brain-steps { margin: 0 0 34px; padding-left: 20px; font-size: 1rem; line-height: 1.8; }
.gm-brain-subhead { margin: 8px 0 6px; font: 700 1.12rem/1.3 var(--gm-display); }
.gm-brain-topics { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: topic; }
.gm-brain-topics li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding: 20px 0;
    border-top: 1px solid var(--gm-line);
}
.gm-brain-topics li > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gm-brain-topics strong { font-size: 1.05rem; }
.gm-brain-study { font-size: .9rem; line-height: 1.6; color: var(--gm-ink-2, var(--gm-ink)); }
.gm-brain-go { flex: none; color: var(--gm-gold-ink); font-weight: 700; white-space: nowrap; }
.gm-brain-go--main { font-size: 1.02rem; }
.gm-brain-go.is-disabled, .gm-brain-go:disabled { opacity: .45; cursor: not-allowed; }
.gm-brain-actions { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 28px; }

.gm-brain-chapters { margin: 0 0 18px; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 32px; }
.gm-brain-chapters legend { margin-bottom: 16px; font: 700 1.12rem/1.3 var(--gm-display); }
.gm-brain-check { display: flex; align-items: flex-start; gap: 10px; font-size: .96rem; line-height: 1.4; cursor: pointer; }
.gm-brain-check input { margin-top: 3px; accent-color: var(--gm-gold-ink); }
.gm-brain-check--all { grid-column: 1 / -1; padding-bottom: 6px; font-weight: 700; }

@media (max-width: 520px) {
    .gm-brain-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 32px); }
    .gm-brain-topics li { flex-direction: column; gap: 8px; }
    .gm-brain-dialog-head { padding: 24px 20px 6px; }
    .gm-brain-dialog-body { padding: 10px 20px 26px; }
    .gm-brain-subjects { gap: 10px 22px; margin-bottom: 24px; padding-bottom: 20px; }
    .gm-brain-dialog-title { font-size: 1.5rem; }
}
