/* Minigem hub (minigem.uk): the Gradebook's look (Google Sans, its colours and gem), shared with every product */
:root {
  --bg: #fbfaf6; --surface: #ffffff; --surface-2: #f2efe7; --surface-3: #e7e2d6; --hover: #f5f2ea;
  --border: #e2ddd0; --border-strong: #c3c8d2;
  --text: #1b2032; --text-2: #3f465a; --muted: #5d6477;
  --accent: #2f6fd6; --accent-2: #4d8ae8; --accent-soft: #e7f0fc; --accent-ink: #2358b8; --on-accent: #ffffff;
  --good: #17a36b; --good-soft: #e3f6ec; --warn: #c98a00; --warn-soft: #fff5d9; --bad: #e5484d; --bad-soft: #fdecec;
  --shadow: 0 1px 2px rgba(16, 22, 52, .05), 0 2px 8px rgba(16, 22, 52, .05);
  --spine: #101634; --gem: linear-gradient(135deg, #de4570 0%, #8b5cf6 52%, #35a3e9 100%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320; --surface: #171d2d; --surface-2: #1c2338; --surface-3: #2b3450; --hover: #1f2740;
    --border: #29314a; --border-strong: #3a4463; --text: #e6ebf5; --text-2: #b9c2d8; --muted: #98a3bd;
    --accent: #5b9cf5; --accent-2: #8fb9f5; --accent-soft: rgba(91, 156, 245, .16); --accent-ink: #8fb9f5; --on-accent: #0d1117;
    --good: #3fb950; --good-soft: rgba(63, 185, 80, .14); --warn: #d29922; --warn-soft: rgba(210, 153, 34, .15);
    --bad: #ff7b72; --bad-soft: rgba(255, 123, 114, .14); --shadow: 0 1px 0 rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: 'Google Sans', 'Google Sans Text', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-weight: 600; margin: 0; line-height: 1.25; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* the top bar is the suite's own (MGSuite.topbar: the dark spine); only the brand's words and the avatar here */
.mgs-top { position: sticky; top: 0; }
.mgs-brand img { width: 30px; height: 30px; }
.mgs-brand .word b { font-weight: 600; }
.mgs-brand .word span { opacity: .75; font-weight: 500; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .12); padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font: 600 14px/1 inherit; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* buttons, cards, pills */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 500 14px/1 inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-ink); }
.btn.gem { background: var(--gem); border: 0; color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn svg, .ico { width: 16px; height: 16px; flex: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--accent-soft); color: var(--accent-ink); }
.pill.owner { background: var(--gem); color: #fff; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--text); }
.banner.info { background: var(--accent-soft); }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--warn); }
.banner.info svg { color: var(--accent-ink); }

/* app cards */
.app-card { display: flex; flex-direction: column; gap: 14px; }
.app-head { display: flex; gap: 12px; align-items: center; }
.app-mark { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.app-mark svg { width: 22px; height: 22px; }
.app-mark.java { background: linear-gradient(135deg, #2f6fd6, #8b5cf6); }
.app-mark.gradebook { background: linear-gradient(135deg, #de4570, #8b5cf6); }
.app-mark.school { background: linear-gradient(135deg, #0d9488, #2f6fd6); }
.app-head h3 { font-size: 17px; }
.figs { display: flex; gap: 24px; }
.figs div { display: flex; flex-direction: column; }
.figs b { font-size: 22px; font-weight: 600; }
.figs span { font-size: 12px; color: var(--muted); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.input { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 400 14px/1 inherit; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--text); }

/* the page body under the suite's tabs */
.wrap { max-width: 1160px; margin: 0 auto; padding: 24px 16px 64px; }
.mgs-page.mgs-page { max-width: 1160px; }
@media (max-width: 640px) { .mgs-page.mgs-page { padding: 16px 16px 56px; } }
.section-title { font-size: 15px; font-weight: 600; margin: 28px 0 12px; }
.lead { font-size: 17px; color: var(--text-2); }

/* signed out */
.signin { max-width: 440px; margin: 72px auto; text-align: center; }
.signin .card { padding: 32px 28px; }
.signin img { width: 56px; height: 56px; }
.signin h1 { font-size: 24px; margin: 14px 0 6px; }
#gsiButton { display: flex; justify-content: center; margin: 22px 0 8px; min-height: 44px; }

/* (stage H3a) the owner's test mode is on */
.testbar { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 8px 16px; background: var(--bad); color: #fff; font-weight: 500; font-size: 14px; text-align: center; }
.testbar svg { width: 16px; height: 16px; flex: none; }
.testbar a { color: #fff; text-decoration: underline; }
.pill svg { width: 13px; height: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--spine); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow); z-index: 100; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }

/* the home page */
.hero { text-align: center; padding: 72px 16px 40px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 600; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; background: var(--gem); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 640px; margin: 16px auto 28px; }
.footer { border-top: 1px solid var(--border); padding: 24px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.footer a { color: var(--muted); margin: 0 10px; }

@media (max-width: 640px) {
  .mgs-brand .word span { display: none; }
  .figs { gap: 16px; }
  .card { padding: 16px; }
}
