:root {
  color-scheme: light;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background: #f6f4ef;
  color: #1c1915;
}

* { box-sizing: border-box; }

body {
  margin: 0;
}

main {
  max-width: 28rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

p { line-height: 1.45; }

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.providers {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hint {
  margin: 0;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border: 1px solid #e4dfd4;
  border-radius: 0.5rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
}

form {
  display: grid;
  gap: 0.5rem;
}

label {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  font: 1rem/1.4 ui-sans-serif, system-ui, sans-serif;
  padding: 0.7rem 0.75rem;
  border: 1px solid #cfc8ba;
  border-radius: 0.5rem;
  background: #fff;
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/google-sans-medium-8aeb7865.ttf") format("truetype");
}

@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/mona-sans-medium-a78551c8.ttf") format("truetype");
}

/* GitHub sign-in: 2026 Invertocat in white on Gray 6 (#101411), Mona Sans.
   Google sign-in: light standard button from the Identity branding guidelines
   (fill #fff, 1px #747775 stroke, #1f1f1f Google Sans Medium 14/20, 4px radius).
   These rules stay off the shared .button styles so the page palette does not replace the brand colors. */
.sign-in-github,
.sign-in-google {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 12px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sign-in-github {
  color: #fff;
  background: #101411;
  border: 1px solid #101411;
  border-radius: 6px;
  font-family: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.sign-in-google {
  color: #1f1f1f;
  background: #fff;
  border: 1px solid #747775;
  border-radius: 4px;
  font-family: "Google Sans", arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.25px;
}

.sign-in-github__mark,
.sign-in-google__mark {
  position: relative;
  z-index: 1;
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.sign-in-github__label,
.sign-in-google__label {
  position: relative;
  z-index: 1;
}

.sign-in-provider__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sign-in-github:hover,
.sign-in-github:focus-visible {
  background: #232925;
  border-color: #232925;
}

.sign-in-google:hover .sign-in-provider__veil,
.sign-in-google:focus-visible .sign-in-provider__veil {
  background: rgba(31, 31, 31, 0.08);
}

.sign-in-google:active .sign-in-provider__veil {
  background: rgba(31, 31, 31, 0.12);
}

.sign-in-github:focus-visible {
  outline: 2px solid #101411;
  outline-offset: 2px;
}

.sign-in-google:focus-visible {
  outline: 2px solid #00639b;
  border-color: transparent;
}

.button,
button,
input[type="submit"] {
  display: inline-block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font: 600 1rem/1.2 ui-sans-serif, system-ui, sans-serif;
  color: #fff;
  background: #1c1915;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
}

form button,
form input[type="submit"] {
  margin-top: 0.35rem;
}

.flash {
  font-family: ui-sans-serif, system-ui, sans-serif;
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  margin: 0 0 1rem;
}

.flash.alert {
  background: #fff4f0;
  border: 1px solid #e7b2a4;
}

.flash.notice {
  background: #f3f7f1;
  border: 1px solid #b7cdb4;
}

.dev-code {
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: #fff8dc;
  border: 1px solid #e6d48a;
  border-radius: 0.5rem;
  padding: 0.75rem 0.85rem;
}

.api-key-secret {
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: #fff8dc;
  border: 1px solid #e6d48a;
  border-radius: 0.5rem;
  padding: 0.75rem 0.85rem;
  margin: 0 0 1rem;
}

.api-key-secret p {
  margin: 0;
}

.api-key-secret code {
  display: block;
  margin-top: 0.35rem;
  user-select: all;
  word-break: break-all;
}

a.key-action {
  margin-bottom: 0.75rem;
}

form.sign-out {
  margin-top: 1.5rem;
}

@media (max-width: 40rem) {
  main { padding-top: 1.5rem; }
}
