/* src/publish_core/open-pages.css — the sign-in link and the legal footer publish adds to a public project page for an anonymous visitor,
   and the 401 sign-in page of a project page that needs a sign-in (openpages.py; publish 0.9.25, session 1018c, 1018c-Q460 b, Q391 b).
   version 0.2.0 · created 2026-10-27 by Pascal Ehlig, ITS · edited 2026-10-27 by Pascal Ehlig, ITS
   Served at /_gwydion/open-pages.css (style-src 'self' holds under the bundle CSP and the page CSP; nothing inline). The link sits in the
   float slot top-right (the kit's float manager adopts it when a page loads one); the page keeps a top band free for it, so it covers
   no content at the top. Light and dark by prefers-color-scheme; the kit's roles when the page has them, else the fallbacks below. */
.gw-open-signin, .gw-open-legal, .gw-open-login {
  --gw-open-text: var(--c-text, #18211c); --gw-open-surface: var(--c-raised, #ffffff); --gw-open-border: var(--c-border, #cfd5c4);
  --gw-open-action: var(--c-action, #2c6a4c); --gw-open-on-action: var(--c-on-action, #ffffff); --gw-open-focus: var(--c-focus, #2c6a4c);
}
@media (prefers-color-scheme: dark) {
  .gw-open-signin, .gw-open-legal, .gw-open-login {
    --gw-open-text: var(--c-text, #e6ebe3); --gw-open-surface: var(--c-raised, #1d2420); --gw-open-border: var(--c-border, #3d4a41);
    --gw-open-action: var(--c-action, #7fc8a0); --gw-open-on-action: var(--c-on-action, #0f1612); --gw-open-focus: var(--c-focus, #9fe0bc);
  }
}
html:has(> body > a.gw-open-signin) { padding-top: calc(env(safe-area-inset-top, 0px) + 3.25rem); }
a.gw-open-signin {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 12px); left: auto; bottom: auto;
  z-index: 40; box-sizing: border-box; display: inline-block; min-height: 2.25rem; padding: .45rem .9rem;
  font: 600 .95rem/1.3 var(--font, system-ui, sans-serif); text-decoration: none; white-space: nowrap;
  color: var(--gw-open-on-action); background: var(--gw-open-action); border: 1px solid var(--gw-open-action); border-radius: 999px;
  box-shadow: 0 2px 8px #00000029;
}
a.gw-open-signin:hover { filter: brightness(1.08); }
/* 0.2.0 (1018c-Q390 b): the signed-in person's name and Sign out, quieter than the sign-in button */
a.gw-open-account { color: var(--gw-open-text); background: var(--gw-open-surface); border-color: var(--gw-open-border); font-weight: 500; }
a.gw-open-signin:focus-visible, .gw-open-legal a:focus-visible, .gw-open-button:focus-visible { outline: 3px solid var(--gw-open-focus); outline-offset: 2px; }
.gw-open-legal { box-sizing: border-box; margin: 2rem 0 0; padding: .75rem 1rem; border-top: 1px solid var(--gw-open-border);
  font: 400 .9rem/1.4 var(--font, system-ui, sans-serif); color: var(--gw-open-text); text-align: center; }
.gw-open-legal-links a { color: inherit; margin: 0 .6rem; }
@media print { a.gw-open-signin { display: none !important; } html:has(> body > a.gw-open-signin) { padding-top: 0; } }
/* the 401 sign-in page */
body.gw-open-login { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--gw-open-text);
  background: var(--c-surface, #f6f7f2); font: 400 1rem/1.5 var(--font, system-ui, sans-serif); }
@media (prefers-color-scheme: dark) { body.gw-open-login { background: var(--c-surface, #121814); } }
body.gw-open-login main { flex: 1; box-sizing: border-box; width: min(34rem, 100%); margin: 0 auto; padding: 3rem 1.25rem; }
body.gw-open-login h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
.gw-open-button { display: inline-block; min-height: 2.75rem; box-sizing: border-box; padding: .6rem 1.2rem; border-radius: 8px; font-weight: 600;
  text-decoration: none; color: var(--gw-open-on-action); background: var(--gw-open-action); }
