/* Account pages (/sign-in, /sign-up, /account, /verify, /admin) and the privacy notice.
   Built on Bootstrap and css/site.css; colours come from the same --accent tokens. */

.account-card { max-width: 460px; border: 1px solid var(--line); border-radius: 12px; }
.account-card-wide { max-width: 560px; }
.account-wide { max-width: 760px; }
.account-admin { max-width: 1100px; }
.account-card a:not(.btn), .account-wide a:not(.btn), .privacy a { color: var(--accent); }

.account-link { white-space: nowrap; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.sso-btn, #passkeyBtn { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; }
.sso-mark { width: 18px; height: 18px; flex: none; background: center / contain no-repeat; }
.sso-google { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.6 20.5H42V20H24v8h11.3C33.7 32.7 29.2 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 13 4 4 13 4 24s9 20 20 20 20-9 20-20c0-1.3-.1-2.4-.4-3.5z'/%3E%3Cpath fill='%23FF3D00' d='M6.3 14.7l6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.2 0-9.6-3.3-11.3-8l-6.5 5C9.5 39.6 16.2 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.6 20.5H42V20H24v8h11.3c-.8 2.2-2.2 4.2-4.1 5.6l6.2 5.2C37 39.2 44 34 44 24c0-1.3-.1-2.4-.4-3.5z'/%3E%3C/svg%3E"); }
.sso-microsoft { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 23'%3E%3Cpath fill='%23f35325' d='M1 1h10v10H1z'/%3E%3Cpath fill='%2381bc06' d='M12 1h10v10H12z'/%3E%3Cpath fill='%2305a6f0' d='M1 12h10v10H1z'/%3E%3Cpath fill='%23ffba08' d='M12 12h10v10H12z'/%3E%3C/svg%3E"); }
.sso-passkey { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2933' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M2 21v-1a6 6 0 0 1 9.5-4.9'/%3E%3Ccircle cx='17.5' cy='14.5' r='2.5'/%3E%3Cpath d='M17.5 17v5M17.5 19.5h2'/%3E%3C/svg%3E"); }

.code-input { font-family: var(--font-mono); letter-spacing: .4em; text-align: center; font-size: 1.6rem; }

.type-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.type-choice { position: relative; display: block; cursor: pointer; }
.type-choice input { position: absolute; opacity: 0; inset: 0; }
.type-choice span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--panel); transition: border-color .15s, background .15s; }
.type-choice small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.type-choice input:checked + span { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent); }
.type-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) { .type-choices { grid-template-columns: 1fr; } }

.optional-password summary { cursor: pointer; }

.method { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.method-sub { padding-left: 18px; border-top: 1px dashed var(--line); }
form.method-sub { border-top: 0; }

.privacy { max-width: 760px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 32px; }
.privacy li { margin-bottom: 6px; }
@media (max-width: 560px) { .privacy { padding: 20px; } }

/* Schools, classes and admin */
.join-code { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; letter-spacing: .15em; color: var(--accent-deep); }
.code-small { font-family: var(--font-mono); letter-spacing: .15em; }
.checks { list-style: none; padding-left: 0; }
.checks li { margin: 2px 0; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--bad); }
.checks .unknown { color: var(--warn); }

/* the passkey icon is drawn in dark ink; lighten it in dark mode */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sso-passkey { filter: invert(1); } }
:root[data-theme="dark"] .sso-passkey { filter: invert(1); }

/* Themes (/appearance) */
.appearance { max-width: 980px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.theme-card { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.theme-card.is-current { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.theme-card .swatch { display: flex; height: 54px; }
.theme-card .swatch span { flex: 1; }
.theme-card .swatch span:nth-child(1) { background: var(--s1); flex: 2; }
.theme-card .swatch span:nth-child(2) { background: var(--s2); }
.theme-card .swatch span:nth-child(3) { background: var(--s3); }
.theme-card-body { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.theme-card-body small { color: var(--muted); line-height: 1.3; }
.theme-card-actions { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px 10px; }
.custom-logo-thumb { height: 36px; max-width: 110px; object-fit: contain; }
.custom-logo-preview { height: 60px; max-width: 220px; object-fit: contain; background: var(--panel-2); border-radius: 8px; padding: 6px; }
.colour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.colour-field { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.colour-field input[type="color"] { width: 42px; height: 32px; border: 1px solid var(--line-strong); border-radius: 6px; background: none; padding: 2px; cursor: pointer; }
.colour-field input:disabled { opacity: .35; cursor: not-allowed; }
/* the editor's preview uses the chosen colours (falls back to the page's own) */
.theme-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--tp-paper, var(--paper)); color: var(--tp-ink, var(--ink)); font-family: var(--tp-body), var(--font-body); }
.theme-preview .tp-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--tp-panel, var(--panel)); border-bottom: 1px solid color-mix(in srgb, var(--tp-ink, var(--ink)) 14%, transparent); }
.theme-preview .tp-logo { font-weight: 700; color: var(--tp-accent, var(--accent)); }
.theme-preview .tp-school { height: 32px; max-width: 120px; object-fit: contain; }
.theme-preview .tp-body { padding: 16px; }
.theme-preview .tp-h { font-family: var(--tp-display), var(--font-display); color: var(--tp-ink, var(--ink)); margin: 0 0 6px; }
.theme-preview .tp-muted { opacity: .75; }
.theme-preview .tp-card { background: var(--tp-panel, var(--panel)); border-radius: 10px; padding: 12px; margin: 10px 0; display: flex; gap: 14px; align-items: center; }
.theme-preview .tp-code { font-family: var(--tp-mono), var(--font-mono); color: var(--tp-accent_b, var(--accent-b)); }
.theme-preview .tp-link { color: var(--tp-accent, var(--accent)); font-weight: 600; }
.theme-preview .tp-buttons { display: flex; gap: 8px; }
.theme-preview .tp-btn { padding: 6px 14px; border-radius: 8px; background: var(--tp-accent, var(--accent)); color: #fff; font-weight: 600; }
.theme-preview .tp-btn.b { background: var(--tp-accent_b, var(--accent-b)); }

/* /catalogue */
.catalogue-item { border-top: 1px solid var(--line); padding: .5rem 0; }
.catalogue-item summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.catalogue-item summary .catalogue-move { margin-left: auto; }
.catalogue-item[open] > summary { margin-bottom: .75rem; }
.catalogue-new summary { color: var(--accent); }
