/* Pilot mode's sign-in, sign-up and account pages. Colours come from style.css's settings. No photos yet (the right
   side is a plain tint until the owner supplies images), and the footer bar has no links until those pages exist. */

.auth-page { min-height: 100vh; display: flex; flex-direction: column; font-size: 17px; }
/* One column in the middle of the whole window: logo, then the form. No side panel or pictures for the pilot. */
.auth-layout { flex: 1; display: flex; justify-content: center; }
/* One shared column, 640px wide and centred in the window, for the sign-in screens and the account pages alike, so
   they line up; content is left-aligned inside it. At least 24px from the window's edge. */
.auth-column { width: 100%; max-width: 640px; padding: 48px 24px; display: flex; flex-direction: column;
               align-items: center; }
.auth-logo { width: 100%; max-width: 480px; }
.auth-logo img { width: min(420px, 100%); height: auto; display: block; margin: 0 auto 40px; }
.auth-section { width: 100%; }
.auth-section h1 { color: var(--blue); font-size: 34px; font-weight: 600; line-height: 1.2; margin: 0 0 24px;
                   letter-spacing: -0.2px; }
.auth-section h1 + .auth-sub { margin-top: -12px; }
.auth-sub { font-size: 22px; font-weight: 400; color: #222; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid #DCDCDC; }
.auth-note { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field input {
  font: inherit; font-size: 16px; padding: 7px 10px; min-height: 38px;
  border: 1.5px solid #555; border-radius: 3px; background: #fff; color: #111;
}
.field input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.field span { font-size: 12px; color: #222; }
.auth-links { margin: 4px 0 0; font-size: 13px; line-height: 1.7; }
.auth-links a, .auth-actions a { color: var(--green); text-decoration: none; }
.auth-links a:hover, .auth-actions a:hover { text-decoration: underline; }
/* The login page: Login under the boxes, then a parent block and a student block. Every link and button is at least
   44px tall, easy to tap on a phone. */
.auth-button.auth-wide { align-self: stretch; min-height: 44px; }
.auth-small-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px;
                   font-size: 15px; color: var(--green); }
.auth-divider { border: 0; border-top: 1px solid #DCDCDC; margin: 24px 0; }
.auth-block { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 24px;
              font-size: 17px; }
.auth-block-title { margin: 0; font-weight: 600; color: #222; }
/* Secondary: outlined, so it never competes with the solid Login button. ".auth-button.auth-secondary" is more specific
   than ".auth-button", so it wins wherever it sits in this file. */
.auth-button.auth-secondary { background: #fff; color: var(--green); border: 2px solid var(--green); min-height: 44px;
                              align-self: stretch; text-decoration: none; }
.auth-tap-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); font-size: 17px; }
.auth-choice { margin: 0; font-size: 20px; font-weight: 600; color: var(--blue); }
.auth-choice-line { margin: 0 0 4px; }
.auth-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* Buttons grow to fit their words (never a fixed height a second line could spill out of), with even padding. */
.auth-button {
  font: inherit; font-size: 15px; font-weight: 700; color: #111; background: var(--mint);
  border: 0; padding: 9px 20px; min-height: 38px; line-height: 1.3; cursor: pointer; align-self: flex-start;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; max-width: 100%;
}
.auth-button:disabled { opacity: 0.45; cursor: not-allowed; }
.auth-actions .auth-button { align-self: auto; }
.auth-plain { font: inherit; font-size: 14px; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
/* Status and error messages: as easy to see as the boxes around them (same colours as before). */
.auth-message { margin: 4px 0; color: var(--red); font-size: 18px; font-weight: 600; line-height: 1.4; }
.auth-message.good { color: var(--green); }
/* The sign-up page's hourly-limit answer: the app's amber notice colours, neither success green nor error red. */
.auth-message.notice { color: #5C4600; background: #FFF6E0; border-left: 4px solid #D9A400; padding: 10px 14px; }
/* The consent screen's message sits in a box right above "Create my account" (step 6b polish). */
#consent-message { margin: 8px 0 4px; padding: 14px 16px; background: #FFF6E0; border-left: 4px solid #D9A400;
                   color: #222; font-size: 17px; }
.consent-text {
  max-height: 280px; overflow-y: auto; padding: 14px 16px; border: 1.5px solid #B9CFE4; border-radius: 4px;
  font-size: 15px; line-height: 1.5; background: #F4F8FC;
}
/* The consent text arrives as paragraphs and a list (auth.js consentBlocks), so it wraps normally. */
.consent-text p { margin: 0 0 10px; }
.consent-text ul { margin: 0 0 10px; padding-left: 22px; }
.consent-text li { margin: 0 0 4px; }
.consent-text > :last-child { margin-bottom: 0; }
.consent-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.consent-agree input { margin-top: 3px; }
/* Links that look like the outlined buttons, with the larger words of "Sign up again"; stacked on a phone. */
.consent-links { display: flex; flex-wrap: wrap; gap: 12px; }
.consent-links a.auth-button { font-size: 18px; padding: 10px 26px; }
.consent-links a.auth-button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.consent-agree a[href] { color: var(--green); text-decoration: underline; }
.terms-version { margin: 0; font-size: 14px; color: var(--muted); }
/* The optional sharing choices: the screen after adding a student, and the read-only block on a student's card. */
.marketing-words p { margin: 0 0 12px; }
.marketing-words p:last-child { margin-bottom: 0; }
.marketing-form .account-hello { margin-bottom: 0; }
.marketing-form .account-hello:focus { outline: none; }
.marketing-form .auth-button { min-height: 44px; }  /* Skip and Save the same height */
.marketing-form .consent-agree { font-size: inherit; margin-left: 24px; }  /* the same size as the words around them */
.marketing-block .auth-plain { font-size: inherit; }  /* "click here", inside its sentence */
.marketing-block { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 15px; }
.marketing-title { font-weight: 600; }
@media (max-width: 520px) {
  .consent-links { flex-direction: column; }
  .consent-text { max-height: 180px; }  /* so a phone shows each box with some of the page around it */
}
.auth-footer { background: var(--blue); min-height: 56px; }

.account-main { padding: 44px 24px 48px; max-width: 640px; margin: 0 auto; font-size: 17px; line-height: 1.5; }
/* Never closer than 24px to the window's edge on the account pages, however narrow. */
.account-page .site-header, .me-page .site-header { padding-left: max(24px, var(--page-pad));
                                                    padding-right: max(24px, var(--page-pad)); }
.account-page .account-section { margin-top: 40px; }
.me-page, .account-page { font-size: 17px; }
.account-hello { color: var(--blue); font-size: 30px; font-weight: 600; margin: 0 0 8px; }
.account-page .user .auth-plain { margin-left: 6px; }

@media (max-width: 760px) {
  .auth-column { padding: 28px 24px; }
  .auth-logo img { width: min(300px, 100%); margin-bottom: 24px; }
}

/* Step 4: the parent's student cards (the Family view's card look), the remove panel, and the recovery code. */
.account-section { color: var(--blue); font-size: 22px; font-weight: 600; margin: 32px 0 12px; }
.student-cards { list-style: none; padding: 0; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 360px)); }
.student-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.kid-username { font-size: 15px; color: #222; }
.reset-ask { margin: 6px 0; padding: 14px 16px; background: #FFF6E0; border-left: 4px solid #D9A400; font-size: 15px;
             display: flex; flex-direction: column; align-items: center; gap: 12px; line-height: 1.45;
             text-align: center; align-self: stretch; }
.reset-ask .auth-button { align-self: center; }
/* Step 6b hardening: the code that ties a reset request to the student's own screen. */
.reset-code { font-size: 34px; font-weight: 700; letter-spacing: 4px; color: var(--blue); margin: 8px 0; }
.reset-code-box { font: inherit; font-size: 20px; letter-spacing: 3px; width: 8em; text-align: center; padding: 6px;
                  border: 2px solid #D9A400; border-radius: 4px; }
.reset-type { font-weight: 600; }
/* Security review F6: where the request came from (a hint), and the tick that turns Approve on. */
.reset-origin { color: #333; }
.reset-tick { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-weight: 600; max-width: 34em;
              cursor: pointer; }
.reset-tick-box { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: #D9A400; }
/* The notice box at the top of both parent pages (home and account): centred above the cards, readable, boxed. */
.home-main > #account-message, .account-main > #account-message { text-align: center; font-size: 18px;
  max-width: 640px; margin: 8px auto 16px; padding: 12px 16px; background: #FFF6E0; border-left: 4px solid #D9A400; }
.card-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 10px; }
/* Every button on a student card sits in the middle, like the name and lines around it. Two classes beat the plain
   ".auth-button" rule (which aligns buttons to the left in forms), wherever it sits in this file. */
.card-actions .auth-button, .remove-panel .auth-button { align-self: center; }
.remove-panel .auth-actions { justify-content: center; gap: 20px; }
.hand-hint { font-size: 13px; color: var(--muted); max-width: 220px; }
.waiting .auth-message { font-size: 22px; }
.waiting p { font-size: 18px; }
.remove-panel { border-top: 1px solid #DCDCDC; padding-top: 10px; display: flex; flex-direction: column; gap: 8px;
                text-align: center; }
.auth-button.danger { background: var(--red); color: #fff; }
.add-student { max-width: 420px; }
.recovery-code { font-size: 28px; font-weight: 700; color: var(--blue); letter-spacing: 0.5px; margin: 4px 0; }

/* Step 5: the student's Connect page. */
.connect-page { font-size: 17px; }
.connect-page .site-header { padding-left: max(24px, var(--page-pad)); padding-right: max(24px, var(--page-pad)); }
.feed-list { list-style: none; padding: 0; margin: 0 0 12px; }
.feed-line { padding: 10px 0; border-bottom: 1px solid #ECECEC; }
.feed-now { margin-bottom: 12px; }

/* Step 6: the parent's landing page. Student cards side by side on a wide screen (a grid that wraps, up to 6), stacked
   on a phone. The account page stays one column. */
.home-main { padding: 44px 24px 48px; max-width: 1180px; margin: 0 auto; font-size: 17px; line-height: 1.5; }
.home-main > .account-hello { text-align: center; }
/* The cards keep their width and sit centred as a row; wrapped rows stay centred too. */
.home-cards { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; justify-content: center;
              gap: 18px; }
.home-cards > li { width: min(340px, 100%); }
.home-card { height: 100%; }
.home-empty { margin: 0 auto; }
/* A set-up student's card: today's progress as a bar like the student's Daily Progress (green, filling up, solid green
   at 100%), the count under it, then "N overdue" in red only when there is any. */
.home-progress-box { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; margin-top: 8px; }
.home-progress { display: block; width: min(240px, 100%); height: 14px; background: var(--track-gray);
                 border-radius: 7px; overflow: hidden; }
/* A plain fill with a square end (the track's rounded ends clip it): nothing that looks like a handle. */
.home-progress-fill { display: block; height: 100%; background: var(--green); }
.home-progress-words { font-size: 15px; }
.home-progress-percent { color: var(--blue); font-weight: 600; }
.home-progress-count { color: var(--muted); margin-left: 6px; }
.kid-overdue { font-size: 15px; font-weight: 700; color: var(--red); }
.home-calendars { list-style: none; padding: 0; margin: 0; font-size: 15px; color: #222; text-align: center; }
.home-empty { max-width: 640px; text-align: center; }
/* The steps sit centred under the heading as one block, the numbered lines inside it still read from the left. */
.how-it-works { display: inline-block; text-align: left; margin: 0; padding-left: 22px; }
/* "Add your student" on its own line, centred under the steps, with space above it. */
.home-empty > .auth-button { display: flex; width: fit-content; margin: 22px auto 0; }
.home-page .site-header { padding-left: max(24px, var(--page-pad)); padding-right: max(24px, var(--page-pad)); }
.account-page .student-cards { grid-template-columns: minmax(0, 1fr); }

/* A link styled as a button never shows an underline; names on the parent's student cards aren't links, so no
   underline there either (the Family prototype's cards are links, which is why they had one). */
a.auth-button { text-decoration: none; }
.student-card .kid-name { text-decoration: none; }

/* Design pass: the sign-in and sign-up screens only. Every rule starts with .auth-page (auth.html's body), so the
   account, home, Connect and student pages are unchanged, and this block must stay last so it wins. One type scale:
   page heading 30px, section heading 20px, body 17px, helper text 15px, messages 18px. Colours from the logo: blue
   (--auth-blue; the app's older blue is #143F9C) for page headings, the focus ring and tick boxes, navy #0D3C68 for
   section headings, orange #F68D4C only as a decorative bar (too light for text); links and actions stay green. */
.auth-page { --auth-blue: #005FAD; color: #222; line-height: 1.5; }
.auth-page .auth-section h1 { font-size: 30px; color: var(--auth-blue); text-wrap: balance; }
.auth-page .auth-section h1::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 12px;
                                     border-radius: 2px; background: #F68D4C; }
.auth-page .auth-sub, .auth-page .auth-choice { font-size: 20px; font-weight: 600; line-height: 1.3; color: #0D3C68;
                                                 text-wrap: balance; }
.auth-page .auth-sub { margin: 8px 0 0; padding-bottom: 10px; }
.auth-page p, .auth-page li, .auth-page .consent-agree { text-wrap: pretty; }
.auth-page .auth-note, .auth-page .auth-choice-line { font-size: 17px; color: #222; text-wrap: balance; }
.auth-page .auth-note { margin: 0 0 24px; }
.auth-page .auth-form .auth-note { margin: 0; }
.auth-page .field { gap: 6px; }
.auth-page .field span, .auth-page .hint, .auth-page #signup-hint { font-size: 15px; line-height: 1.4; color: #4D4D4D;
                                                                    margin: 0; text-wrap: balance; }
.auth-page .field input { font-size: 17px; min-height: 44px; padding: 9px 12px; border-radius: 4px; }
.auth-page .field input:focus { outline: 3px solid var(--auth-blue); outline-offset: 1px; }
.auth-page .auth-form { gap: 20px; }
.auth-page .auth-form .auth-message { margin: 0; }
.auth-page .auth-message { text-wrap: balance; }
/* Links inside a sentence: green like every other link, and underlined, so colour isn't the only sign. */
.auth-page .auth-note a, .auth-page .auth-message a, .auth-page .auth-choice-line a { color: var(--green);
                                                                                       text-decoration: underline; }
/* "Log in" after the reset message: its own line, a tap-sized link, never split across lines. */
.auth-page #reset-done a { display: flex; align-items: center; width: fit-content; min-height: 44px; margin-top: 8px; }
.auth-page .consent-agree { font-size: 17px; gap: 12px; }
.auth-page .consent-agree input { flex: none; width: 20px; height: 20px; margin: 2px 0 0;
                                  accent-color: var(--auth-blue); }
.auth-page .auth-button { font-size: 16px; min-height: 44px; padding: 10px 22px; }
.auth-page .auth-actions { flex-wrap: wrap; row-gap: 12px; margin-top: 4px; }
.auth-page .auth-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; }
/* A message with links under it (join's no-link and expired states): the links together, under the message. */
.auth-page #join-ended .auth-actions { justify-content: flex-start; column-gap: 28px; margin-top: 16px; }
/* There the two are buttons (Sign in filled like Login, Sign up again outlined), with slightly larger words. */
.auth-page #join-ended .join-ended-buttons { column-gap: 16px; }
.auth-page #join-ended .join-ended-buttons a.auth-button { font-size: 18px; padding: 10px 26px; text-decoration: none; }
.auth-page #join-ended .join-ended-buttons a.auth-button:not(.auth-secondary) { color: #111; }
.auth-page .waiting .auth-message { font-size: 20px; }
.auth-page .waiting p { font-size: 17px; }
.auth-page .waiting .reset-code { font-size: 34px; }
@media (max-width: 520px) {
  .auth-page .auth-section h1 { font-size: 26px; }
}
