/* Landing, role, teacher and support pages (SYS-507). Loaded after conductor.css.
   Floor: 18px text and 44px touch targets on every element, labels included. */

body.roles { font-size: 18px; }
.roles .label, .roles .small, .roles .side__muted, .roles .linklike, .roles .field-error,
.roles .brand, .roles .draft-tag { font-size: 18px; }
.roles .btn, .roles .input, .roles .select, .roles .role-bar a, .roles .role-bar button,
.roles .lang-links a, .roles .row-link { min-height: 44px; }
.roles .btn { padding: 10px 18px; }
.roles .input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--grey-1); border-radius: var(--radius); background: var(--white); }
/* Placeholder text at grey-1, 5.9:1 on white (the browser default is about 2.5:1; Nectar on #69). */
.roles .input::placeholder { color: var(--grey-1); opacity: 1; }

.role-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--white); }
.role-bar__who { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.role-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.role-bar form { display: inline; margin: 0; }

.home { max-width: 880px; margin: 0 auto; padding: 48px 20px 80px; display: grid; gap: 32px; }
.home__head { display: grid; gap: 8px; }
.home__head h1 { font-size: 36px; }
.home__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.choice { position: relative; border: 1px solid var(--ink); background: var(--white); padding: 28px; display: grid; gap: 14px; align-content: start; }
.choice h2 { font-size: 26px; }
.choice form { display: grid; gap: 10px; }
.choice .btn { justify-self: start; }
.lang-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.lang-links a { display: inline-flex; align-items: center; padding: 0 4px; }
.lang-links a[aria-current="true"] { color: var(--ink); font-weight: 500; text-decoration: none; }
.home-error { border-left: 3px solid var(--ink); padding: 8px 12px; background: var(--white); }

.role-page { max-width: 640px; margin: 0 auto; padding: 48px 20px; display: grid; gap: 24px; }
/* The top bar's gutter is the page column's (SYS-595 F8, F11): the brand lines up with the
   heading under it at every width, 20 px on a phone like the column. */
.page-home .topbar { padding-left: max(20px, calc((100% - 840px) / 2)); padding-right: max(20px, calc((100% - 840px) / 2)); }
/* SYS-603: three choices. One row of three at 1280 px and up (the column widens to 1120 px so
   the class link field keeps its room), one column on a phone, auto-fit in between. */
@media (max-width: 720px) {
  .home__choices { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1280px) {
  .home { max-width: 1160px; }
  .home__choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-home .topbar { padding-left: calc((100% - 1120px) / 2); padding-right: calc((100% - 1120px) / 2); }
}
.page-role .topbar { padding-left: max(20px, calc((100% - 600px) / 2)); padding-right: max(20px, calc((100% - 600px) / 2)); }
.role-page .state-card { gap: 12px; }
.role-page__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Teacher pages (SYS-507): percent only. */
.roles .figures--teacher { grid-template-columns: 2fr 1fr 1fr; }
.roles .figures dd { font-size: 24px; white-space: normal; }
.roles .spendbar__scale { font-size: 18px; }
.roles .linkbox__url { font-size: 18px; min-height: 44px; }
/* SYS-635: the class link gets its own row, so the whole link shows before the buttons. */
.roles #class-link-panel .linkbox__url { flex-basis: 100%; }
.roles .topbar__crumb { font-size: 18px; }
.class-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.class-row { grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr) auto; align-items: center; gap: 20px; }
.class-row__name { font-size: 24px; }
.class-row__use { display: grid; gap: 8px; }
.view-as { background: var(--ink); color: var(--white); padding: 12px 24px; font-weight: 500; }
.view-as a { color: var(--white); }
@media (max-width: 720px) {
  .roles .figures--teacher { grid-template-columns: 1fr 1fr; }
  .roles .figures__wide { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
  .roles .linkbox__off { flex-basis: 100%; }
  .class-row { grid-template-columns: 1fr; }
}

/* Support (SYS-507). */
.support-search { display: grid; gap: 8px; }
.support-search__row { display: flex; gap: 10px; flex-wrap: wrap; }
.support-search__row .input { flex: 1; min-width: 240px; width: auto; }
.support-table { width: 100%; border-collapse: collapse; }
.support-table th { text-align: left; font-weight: 500; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--ink); }
.support-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.support-table form { margin: 0; }
.support-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.support-actions form { margin: 0; }
.roles .select { min-height: 44px; padding: 8px 10px; border: 1px solid var(--grey-1); background: var(--white); }
.row-link { display: inline-flex; align-items: center; }
@media (max-width: 720px) {
  .support-table thead { display: none; }
  .support-table tr { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .support-table td { border: 0; padding: 0; }
}
.roles label { font-size: 18px; }
.view-as a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 8px; }

/* Sign-in for every role (SYS-526). */
.signin { max-width: 560px; margin: 0 auto; padding: 48px 20px 80px; display: grid; gap: 18px; align-content: start; }
.signin h1 { font-size: 32px; }
.signin__form { display: grid; gap: 10px; }
.signin__form .btn, .signin__again { justify-self: start; white-space: normal; }
.signin__why { border-left: 3px solid var(--ink); padding: 8px 12px; background: var(--white); font-weight: 500; }
/* PR D (SIGNIN_CODE): the line under the code box. */
.signin__hint { margin: 0; }
.page-signin .brand { font-family: var(--sans); letter-spacing: 0; }

/* Today's prompts on the teacher page (SYS-522). 18 px text, 44 px targets. */
.prompts__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.prompts h2.label, .prompts h3.label { margin: 0; }
.prompt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.prompt-item { border: 1px solid var(--ink); padding: 14px 16px; display: grid; gap: 10px; background: var(--white); }
.prompt-item--hidden { border-style: dashed; border-color: var(--grey-1); background: var(--ground); }
.prompt-item__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.prompt-item__n { font-size: 18px; color: var(--grey-1); min-width: 1.5em; }
.prompt-item__label { font-size: 20px; font-weight: 500; margin: 0; flex: 1; min-width: 12ch; overflow-wrap: anywhere; }
.prompt-item__state { font: 500 18px var(--mono); letter-spacing: 0.04em; padding: 4px 8px; background: var(--ink); color: var(--white); }
.prompt-item--hidden .prompt-item__state { background: transparent; color: var(--grey-1); border: 1px dashed var(--grey-1); }
.prompt-item__body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--grey-1); }
.prompt-item__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-item__actions form { margin: 0; }
.prompt-edit > summary, .prompt-form__versions > summary { list-style: none; cursor: pointer; width: fit-content; }
.prompt-edit > summary::-webkit-details-marker, .prompt-form__versions > summary::-webkit-details-marker { display: none; }
.prompt-edit[open] > summary { margin-bottom: 10px; }
.prompt-form { display: grid; gap: 6px; }
.prompt-form label { margin-top: 6px; }
.prompt-form .btn { justify-self: start; margin-top: 8px; }
.roles .prompt-form__body { min-height: 120px; resize: vertical; line-height: 1.5; font-size: 18px; }
.prompt-form__versions { display: grid; gap: 6px; margin-top: 6px; }
.prompt-form__versions > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); text-decoration: underline; }
.prompt-add { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.prompt-pack { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; } /* SYS-643 */
.prompt-pack .select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
/* SYS-699: add a practice step, the same shape as the pack form. */
.prompt-add--practice, .prompt-add--practice form { min-width: 0; }
.prompt-add--practice form { display: grid; gap: 8px; }
.prompt-add--practice .select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.prompt-add--practice .btn { justify-self: start; }
.prompt-pack__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-error { border-left: 3px solid var(--ink); padding: 8px 12px; background: var(--ground); font-weight: 500; }

/* Accessibility statement (SYS-544): one readable column, 18 px text. */
.a11y-statement { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; display: grid; gap: 20px; align-content: start; font-size: 18px; }
.a11y-statement h1 { font-size: 36px; }
.a11y-statement h2 { font-size: 24px; margin-bottom: 8px; }
.a11y-statement ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.a11y-statement a { overflow-wrap: anywhere; }
.a11y-statement__lead { font-size: 20px; }
.home__more { margin-top: 24px; }

/* Usage counts (SYS-543): the live "asked for help" line and "where the class got stuck". */
.help-now { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.help-now__count { font-size: 22px; font-weight: 500; }
.help-now form { margin: 0; }
.help-now .btn { justify-self: start; }
.stuck-list { margin: 0 0 12px; padding-left: 1.4em; display: grid; gap: 6px; }
.usage-table { width: 100%; border-collapse: collapse; }
.usage-table th, .usage-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 18px; }
.usage-table td.num { text-align: right; }

/* Class pace (SYS-621, CLASS_TOOLS on): the Next step panel and the counts per prompt. */
.pace form { margin: 8px 0; }
.prompt-item__counts { margin: 4px 0 0; }
