/* The one look before you are inside a school (NAV-100, B9, D-459): the website, every sign-in page, Which school?,
   setup and join links, the Demo wall and the Control panel's sign-in. One file, loaded as it is by the studio
   (web/index.html), the Demo wall (server/gate.js) and the website (copied by scripts/build-site.js), so they can
   never drift apart. Its colors live under their own names (--fr-*), so a school's look and a person's Appearance
   never reach these pages. Light and soft, a faint dot pattern, white cards with a red line on top. */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/inter-400.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/inter-500.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/inter-600.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/inter-700.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-style: normal; font-display: swap; src: url(/fonts/inter-800.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/nunito-400.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/nunito-600.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/nunito-700.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-style: normal; font-display: swap; src: url(/fonts/nunito-800.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-style: normal; font-display: swap; src: url(/fonts/nunito-900.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-style: italic; font-display: swap; src: url(/fonts/playfair-600-italic.woff2) format('woff2'); }

:root {
  --fr-bg: #edf2f9;
  --fr-dot: rgba(31, 35, 40, 0.09);
  --fr-wash: rgba(208, 52, 60, 0.07);
  --fr-wash-2: rgba(42, 94, 168, 0.05);
  --fr-card: #ffffff;
  --fr-ink: #1f2328;
  --fr-muted: #5f6670;
  --fr-line: #dce3ed;
  --fr-field: #ffffff;
  --fr-field-line: #dce3ed;
  --fr-accent: #d0343c;
  --fr-accent-hover: #b52a32;
  --fr-accent-soft: #fdeced;
  --fr-note: #fdf3dc;
  --fr-note-ink: #6b4a00;
  --fr-error: #fde9ea;
  --fr-error-ink: #b42630;
  --fr-shadow: 0 2px 6px rgba(16, 24, 40, 0.06), 0 30px 60px -24px rgba(16, 24, 40, 0.30);
  --fr-bar: #16191e;
  /* The rounded font (NAV-108, D-475): SF Pro Rounded on Apple devices, Nunito (in /fonts) everywhere else. */
  --fr-font: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, sans-serif;
  --fr-serif: 'Playfair Display', Georgia, serif;
}
/* Light only: the website and the pages before a school never change their look (NAV-108, D-475). */
:root { color-scheme: light; }

/* The page behind: the plain soft blue of the default look (NAV-108, D-475). */
.frame-bg, body:has(.frame-page) {
  background: var(--fr-bg);
  color: var(--fr-ink);
  font-family: var(--fr-font);
  min-height: 100vh;
  margin: 0;
}

/* ---- The card ---- */
.frame-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 16px; box-sizing: border-box; font-family: var(--fr-font); color: var(--fr-ink); }
.frame-card {
  width: 100%; max-width: 27rem; box-sizing: border-box;
  background: var(--fr-card); color: var(--fr-ink);
  border: 1px solid var(--fr-line); border-top: 4px solid var(--fr-accent); border-radius: 16px;
  box-shadow: var(--fr-shadow); padding: 2rem 2rem 1.6rem;
  font-family: var(--fr-font); font-size: 15px; line-height: 1.5; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased;
}
.frame-card *, .frame-card *::before, .frame-card *::after { box-sizing: border-box; }
.frame-card.wide { max-width: 34rem; }
@media (max-width: 480px) { .frame-card { padding: 1.6rem 1.25rem 1.3rem; } .frame-page { padding: 1.25rem 12px; justify-content: flex-start; } }

/* YBK bold, Pressroom in the italic serif (D-177), and a small tag: Beta, Demo, Control panel. */
.frame-brand { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 1.4rem; }
.frame-name { display: inline-flex; align-items: baseline; gap: 0.3rem; font-size: 1.45rem; line-height: 1; color: var(--fr-ink); white-space: nowrap; text-decoration: none; }
.frame-name .ybk { font-weight: 800; letter-spacing: -0.02em; }
.frame-name .press { font-family: var(--fr-serif); font-style: italic; font-weight: 600; color: var(--fr-accent); }
.frame-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fr-muted); border: 1px solid var(--fr-line); border-radius: 999px; padding: 0.12rem 0.55rem; }

.frame-card h1, .frame-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; margin: 0 0 0.35rem; color: var(--fr-ink); }
.frame-lead { color: var(--fr-muted); margin: 0 0 1.4rem; }
.frame-card p { margin: 0 0 1rem; }
.frame-card a { color: var(--fr-accent); font-weight: 500; text-decoration: none; }
.frame-card a:hover { text-decoration: underline; }
.frame-card :focus-visible { outline: 3px solid color-mix(in srgb, var(--fr-accent) 45%, transparent); outline-offset: 2px; }

/* ---- Fields ---- */
.frame-form { display: grid; gap: 1rem; margin: 0 0 0.25rem; }
.frame-field { display: grid; gap: 0.35rem; }
.frame-field > span, .frame-label { font-size: 0.86rem; font-weight: 600; color: var(--fr-ink); }
.frame-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.frame-label-row a { font-size: 0.86rem; }
.frame-card input[type="text"], .frame-card input[type="email"], .frame-card input[type="password"], .frame-card input:not([type]) {
  width: 100%; height: 2.85rem; padding: 0 0.85rem; font: inherit; font-size: 1rem; color: var(--fr-ink);
  background: var(--fr-field); border: 1px solid var(--fr-field-line); border-radius: 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.frame-card input::placeholder { color: color-mix(in srgb, var(--fr-muted) 75%, transparent); }
.frame-card input:focus { outline: none; border-color: var(--fr-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fr-accent) 18%, transparent); }

/* ---- Buttons ---- */
.frame-btn, .frame-card .btn.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; min-height: 2.85rem;
  padding: 0 1rem; border-radius: 10px; border: 1px solid var(--fr-accent); background: var(--fr-accent); color: #fff;
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.frame-btn:hover, .frame-card .btn.primary:hover { background: var(--fr-accent-hover); border-color: var(--fr-accent-hover); color: #fff; text-decoration: none; }
.frame-btn:disabled, .frame-card .btn.primary:disabled { opacity: 0.6; cursor: default; }
.frame-btn.quiet, .frame-card .btn:not(.primary):not(.google-btn) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.6rem; padding: 0 1rem;
  background: var(--fr-card); color: var(--fr-ink); border: 1px solid var(--fr-field-line); border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none;
}
.frame-btn.quiet:hover, .frame-card .btn:not(.primary):not(.google-btn):hover { border-color: var(--fr-accent); color: var(--fr-accent); background: var(--fr-card); }
/* Google's own button look: white with its G (Google asks for this), in either mode. */
.frame-google, .frame-card .btn.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; width: 100%; min-height: 2.85rem;
  background: #fff; color: #1f1f1f; border: 1px solid #c4c7c5; border-radius: 10px; font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none;
}
.frame-card a.frame-google, .frame-card a.btn.google-btn { color: #1f1f1f; }
.frame-google:hover, .frame-card .btn.google-btn:hover, .frame-card a.frame-google:hover { background: #f8f9fa; color: #1f1f1f; border-color: #747775; text-decoration: none; }
.frame-card .google-mark, .frame-google svg { width: 1.15rem; height: 1.15rem; flex: none; }

/* "or" between the two ways in */
.frame-or { display: flex; align-items: center; gap: 0.85rem; margin: 1.25rem 0; color: var(--fr-muted); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.frame-or::before, .frame-or::after { content: ''; flex: 1; height: 1px; background: var(--fr-line); }

/* ---- Messages ---- */
.frame-note, .frame-card .signin-note { background: var(--fr-note); color: var(--fr-note-ink); padding: 0.65rem 0.85rem; border-radius: 10px; font-size: 0.88rem; line-height: 1.45; margin: 0 0 1rem; }
.frame-note p:last-child, .frame-card .signin-note p:last-child { margin-bottom: 0; }
.frame-error, .frame-card .error { background: var(--fr-error); color: var(--fr-error-ink); padding: 0.65rem 0.85rem; border-radius: 10px; font-size: 0.88rem; margin: 0 0 1rem; border: 0; }
.frame-small, .frame-card .muted.small { color: var(--fr-muted); font-size: 0.84rem; margin: 0.5rem 0 0; }

/* ---- Help at the foot of the card, and the links under it ---- */
.frame-help { margin: 1.5rem -2rem -1.6rem; padding: 1rem 2rem 1.1rem; border-top: 1px solid var(--fr-line); color: var(--fr-muted); font-size: 0.86rem; border-radius: 0 0 15px 15px; }
@media (max-width: 480px) { .frame-help { margin: 1.25rem -1.25rem -1.3rem; padding: 0.9rem 1.25rem 1rem; } }
.frame-help p { margin: 0; }
.frame-help p + p { margin-top: 0.3rem; }
.frame-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin-top: 1.25rem; font-size: 0.82rem; }
.frame-links a { color: var(--fr-muted); font-weight: 500; text-decoration: none; }
.frame-links a:hover { color: var(--fr-accent); }

/* Little folds, such as "Use the control key instead". */
.frame-card details { margin-top: 1rem; font-size: 0.88rem; color: var(--fr-muted); }
.frame-card summary { cursor: pointer; font-weight: 500; }
.frame-card details[open] summary { margin-bottom: 0.6rem; }

/* Lists of choices: Which school?, and the made-up people on this Mac and Demo. */
.frame-card .people { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; gap: 0.4rem; }
.frame-card .people button {
  width: 100%; display: flex; align-items: center; gap: 0.7rem; min-height: 2.9rem; padding: 0.45rem 0.8rem;
  border: 1px solid var(--fr-line); border-radius: 10px; background: var(--fr-card); color: var(--fr-ink);
  font: inherit; font-weight: 600; text-align: left; cursor: pointer; transition: border-color 140ms ease;
}
.frame-card .people button:hover { border-color: var(--fr-accent); }
.frame-card .people .grow { flex: 1; min-width: 0; }
.frame-card .people .role-pill { color: var(--fr-muted); background: none; border: 0; padding: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.frame-card .people .avatar { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--fr-accent-soft); color: var(--fr-accent); font-weight: 700; flex: none; }
.frame-card button.link { background: none; border: 0; padding: 0; color: var(--fr-accent); font: inherit; cursor: pointer; }
.frame-card code { font-size: 0.85em; background: var(--fr-bg); padding: 0.05rem 0.3rem; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { .frame-card * { transition: none !important; } }

/* Set up your account (ACC-33): the live username check. */
.frame-field > span.frame-small { font-weight: 400; color: var(--fr-muted); margin: 0; }
.frame-field .account-ok { color: var(--fr-ok, #1f7a45); font-weight: 600; }
.frame-field > span.frame-small.account-bad { color: var(--fr-error-ink); }
.frame-field > span.frame-small.account-ok { color: var(--fr-ok, #1f7a45); font-weight: 600; }
.frame-card .link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
/* A link drawn as the big button (Back to sign in): white words, like the button. */
.frame-card a.frame-btn { color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---- The default look, bolder (NAV-108, D-475): the black bar with the red line, floating cards, rounded and bold ---- */
.frame-bar { background: var(--fr-bar); border-bottom: 3px solid var(--fr-accent); min-height: 60px; display: flex; align-items: center; padding: 0 24px; box-sizing: border-box; font-family: var(--fr-font); }
.frame-bar .frame-name { color: #fff; font-size: 1.3rem; }
.frame-bar .frame-name .press { color: #f2555d; }
.frame-bar + .frame-page { min-height: calc(100vh - 63px); }
.frame-card { border: 0; border-top: 4px solid var(--fr-accent); border-radius: 22px; }
.frame-name .ybk { font-weight: 900; }
.frame-tag { color: var(--fr-accent); background: var(--fr-accent-soft); border: 0; font-weight: 800; }
.frame-card h1, .frame-title { font-weight: 900; letter-spacing: -0.01em; font-size: 1.75rem; }
.frame-field > span, .frame-label { font-weight: 800; }
.frame-card input[type="text"], .frame-card input[type="email"], .frame-card input[type="password"], .frame-card input:not([type]) { border-radius: 12px; border-width: 1.5px; background: #f7f9fc; font-weight: 600; }
.frame-btn, .frame-card .btn.primary, .frame-btn.quiet, .frame-card .btn:not(.primary):not(.google-btn) { border-radius: 12px; font-weight: 800; }
.frame-card a { font-weight: 700; }
/* The bold finish (B14, D-476): a deeper lift on the card, 48 px buttons and 46 px boxes like the mock-ups,
   the made-up people as soft rounded rows, and a quiet help line at the foot. */
.frame-card { box-shadow: 0 30px 60px -24px rgba(16, 24, 40, 0.35), 0 2px 6px rgba(16, 24, 40, 0.06); }
.frame-btn, .frame-card .btn.primary, .frame-card .btn:not(.primary):not(.google-btn), .frame-card .google-btn { min-height: 48px; font-size: 1rem; }
.frame-card input[type="text"], .frame-card input[type="email"], .frame-card input[type="password"], .frame-card input:not([type]) { min-height: 46px; }
.frame-card .people button { border-radius: 12px; border-width: 1.5px; font-weight: 700; }
.frame-help { margin: 1.1rem 0 0 !important; text-align: center; font-size: 0.86rem; color: var(--fr-muted); }
/* The Demo wall's progress bar while a demo account's class is made (PLT-77, D-479). */
.demo-making { display: grid; gap: 0.5rem; margin: 0 0 1rem; }
.demo-making[hidden] { display: none; }
.demo-making-title { margin: 0 !important; font-weight: 800; font-size: 1.05rem; }
.demo-making .frame-small { margin: 0 !important; }
.demo-bar { height: 12px; border-radius: 999px; background: var(--fr-bg); overflow: hidden; }
.demo-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--fr-accent); }
.frame-form[hidden], .frame-note[hidden] { display: none; }

/* A new school's setup link (PLT-57, D-485): your account comes first, then the school. */
.frame-steps { display: flex; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: step; font-size: 0.78rem; font-weight: 600; color: var(--fr-muted); }
.frame-steps li { counter-increment: step; display: flex; align-items: center; gap: 0.4rem; flex: 1; padding-bottom: 0.45rem; border-bottom: 3px solid var(--fr-line); }
.frame-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--fr-line); color: var(--fr-ink); font-size: 0.72rem; }
.frame-steps li.is-on { color: var(--fr-ink); border-bottom-color: var(--fr-accent); }
.frame-steps li.is-on::before { background: var(--fr-accent); color: #fff; }
.setup-who { margin: 0 0 0.25rem; }
