/* The website around the reports. report.css (served from client/report.py) defines the colors used here. */
/* Grade Integrity's palette: #FDFEFD (white), #8F9E4F (olive) and #06080A (black). The other shades are mixed from
   these. Olive is too light for text on white, so --accent-text is a deeper olive for links and focus outlines.
   The verdict colors (--v0 to --v3) keep their meanings, so they aren't changed here.
   Signed-in pages follow the computer's light or dark setting. The public website and the sign-in pages are always
   light: their <html> has data-theme="light", which every dark rule below (and in report.css) leaves alone. */
:root[data-theme="light"] { color-scheme: light; }
:root { --bg: #FDFEFD; --surface: #fff; --fg: #06080A; --muted: #4a5045; --line: #dfe3d2; --head: #f1f3e8;
        --accent: #8F9E4F; --accent-fg: #06080A; --accent-text: #566426;
        --panel: #f2f4ec; --panel-active: #e3e7d4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #06080A; --surface: #0f1214; --fg: #FDFEFD; --muted: #a3a99b; --line: #262b20; --head: #151a12;
          --accent: #8F9E4F; --accent-fg: #06080A; --accent-text: #b3c174;
          --panel: #020304; --panel-active: #151a12; }
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; font-size: 17px; color: var(--fg); }
.logo { width: auto; height: 32px; flex: none; }

/* The panel on the left, for anyone signed in. On phones it becomes a bar across the top. */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.shell main { width: 100%; }
.panel { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
         padding: 14px 12px; background: var(--panel); border-right: 1px solid var(--line); }
.panel .brand { padding: 2px 8px 12px; border-bottom: 2px solid var(--accent); }
.panel nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.panel-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; border: none;
              border-radius: 8px; background: none; color: var(--muted); font-size: 15px; text-align: left; text-decoration: none; }
.panel-link:hover { background: var(--panel-active); color: var(--fg); }
.panel-link[aria-current] { background: var(--panel-active); color: var(--accent-text); font-weight: 600; }
.nav-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
            stroke-linecap: round; stroke-linejoin: round; }
.panel-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.panel-user { margin: 0 10px 6px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) {
  .shell { display: block; min-height: 0; }
  .panel { position: static; height: auto; flex-flow: row wrap; align-items: center; justify-content: space-between; gap: 8px;
           border-right: none; border-bottom: 2px solid var(--accent); }
  .panel .brand { padding: 2px 0; border-bottom: none; }
  .panel nav { order: 3; flex: 0 0 100%; flex-flow: row wrap; }
  .panel nav .panel-link { width: auto; white-space: nowrap; padding: 6px 8px; min-height: 36px; font-size: 14px; }
  .panel-foot { border-top: none; padding-top: 0; }
  .panel-foot .panel-link { width: auto; padding: 6px 8px; font-size: 14px; }
  .panel-user { display: none; }
}

main > h1:first-child, main > .narrow > h1:first-child { margin-top: 8px; }

a { color: var(--accent-text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.narrow { max-width: 640px; }
.auth { max-width: 380px; margin: 40px auto; }
.inline { display: inline; margin: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar { margin-bottom: 8px; }
.actions { display: flex; gap: 8px; align-items: center; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }

button, .button { font: inherit; font-size: 14px; border-radius: 8px; padding: 8px 14px; border: 1px solid var(--line);
                  background: var(--surface); color: var(--fg); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--muted); }
button:disabled { opacity: .6; cursor: progress; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.primary:hover { border-color: var(--accent); filter: brightness(1.08); }
.danger { color: var(--v0); border-color: var(--v0); }
button.link { border: none; background: none; padding: 0; color: var(--muted); font-size: inherit; }
button.link:hover { color: var(--fg); }
.danger-text { color: var(--v0) !important; }
.wide { width: 100%; text-align: center; }
/* "Sign in with Google" in Google's own colours (_google_button.html); don't restyle it to match the site */
.gsi-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 40px;
  padding: 0 12px; border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f;
  font: 500 14px/20px Roboto, Arial, sans-serif; letter-spacing: .25px; text-decoration: none; }
.gsi-button:hover { background: #f2f2f2; color: #1f1f1f; }
.gsi-button svg { width: 20px; height: 20px; flex: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gsi-button { background: #131314; border-color: #8e918f; color: #e3e3e3; }
  :root:not([data-theme="light"]) .gsi-button:hover { background: #222224; color: #e3e3e3; } }
form .wide, form > .primary { margin-top: 16px; }

label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 14px; }
input[type=email], input[type=password], input[type=text], textarea, input[type=file] {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--fg); font: inherit; }
textarea { resize: vertical; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
/* "Skip to content", the first thing a keyboard user reaches on every page */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.inline-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; margin-right: 20px; }
.options { margin: 16px 0 4px; }

.card, .checklist, .progress-line, .wrap { background: var(--surface); }
.card { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 16px 0; }
.card h2 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; }
.link-card { text-decoration: none; color: inherit; }
.with-icon { display: flex; gap: 14px; align-items: flex-start; }
.card-icon { width: auto; height: 40px; flex: none; }
.file-icon { width: 40px; fill: none; stroke: var(--accent-text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.link-card:hover { border-color: var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
section.card form { margin-top: 4px; }
section.card .button, section.card button { margin-top: 12px; }

.checklist { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.checklist label { display: flex; gap: 10px; align-items: baseline; font-weight: 400; margin: 0; padding: 10px 0;
                   border-bottom: 1px solid var(--line); }
.checklist label:last-child { border-bottom: none; }
.checklist label[hidden] { display: none; }
.checklist .no-match { margin: 0; padding: 10px 0; }
.search-row { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.search-row .search { flex: 1; min-width: 0; }
input[type=search] { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
                     background: var(--surface); color: var(--fg); font: inherit; }

/* free trial / subscription line at the top of the teacher's pages (base.html), when billing is on */
.plan-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0 0 16px; padding: 9px 14px;
             border-radius: 8px; background: var(--head); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.plan-line a { font-weight: 600; }
.plan-line.ended { background: var(--v1bg); border-color: transparent; color: var(--v1); }
.plan-line.ended a { color: inherit; }
.subscription-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 6px; }

.flash { padding: 10px 14px; border-radius: 8px; background: var(--v2bg); color: var(--v2); margin: 12px 0; }
.flash.error { background: var(--v0bg); color: var(--v0); }
.or { text-align: center; color: var(--muted); margin: 16px 0 0; }
.busy-note { display: none; }
form.busy .busy-note { display: block; }
.progress-line { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line);
                 border-radius: 10px; margin: 16px 0; }
.pdfs { margin-top: 4px; font-size: 13px; white-space: nowrap; }
.pdfs a { color: var(--accent-text); }
.pdf-frame { display: block; width: 100%; height: 78vh; min-height: 420px; border: 1px solid var(--line); border-radius: 10px;
             background: var(--surface); margin: 12px 0; }
.pdf-inline { display: block; width: 100%; height: 75vh; min-height: 420px; margin: 8px 0 4px; border: 1px solid var(--line);
              border-radius: 8px; background: var(--surface); }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
           animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: var(--line); border-right-color: var(--accent); } }

/* "Choose the files students uploaded" (uploads.html) */
.file-list { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; margin: 12px 0 16px; list-style: none; }
.file-list li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.file-list li:last-child { border-bottom: none; }
.uploads-form { margin-top: 18px; }
