:root {
  color: #171717;
  background: #f7f7f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* { box-sizing: border-box; }

html, body, #app {
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
}

body { overflow: hidden; }

#app { position: relative; }

.admin-link {
  position: fixed;
  z-index: 10;
  top: 18px;
  right: 20px;
  color: #555;
  font-size: 13px;
  text-decoration: none;
}

.admin-link:hover { color: #171717; text-decoration: underline; }

#chatgpt-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.status-panel,
.access-panel {
  min-height: 100%;
  display: grid;
  place-content: center;
  padding: 24px;
}

.status-panel {
  justify-items: center;
  color: #555;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #d6d6d2;
  border-top-color: #171717;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.access-panel {
  grid-template-columns: minmax(0, 420px);
  gap: 28px;
  align-content: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: 0;
}

.access-copy > p:last-child {
  margin: 14px 0 0;
  color: #5a5a56;
  line-height: 1.65;
}

form { display: grid; gap: 8px; }
label { font-size: 13px; font-weight: 650; }

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input,
button {
  min-height: 44px;
  border: 1px solid #c9c9c4;
  border-radius: 6px;
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  color: inherit;
  background: #fff;
}

button {
  padding: 0 18px;
  border-color: #171717;
  color: #fff;
  background: #171717;
  cursor: pointer;
}

button:disabled { opacity: .55; cursor: wait; }
.error { margin: 4px 0 0; color: #b42318; font-size: 13px; }

[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .access-panel { padding: 20px; }
  .input-row { grid-template-columns: minmax(0, 1fr); }
  button { width: 100%; }
}

@media (prefers-color-scheme: dark) {
  :root { color: #f4f4f2; background: #181817; }
  .admin-link { color: #b8b8b2; }
  .admin-link:hover { color: #f4f4f2; }
  .access-copy > p:last-child, .status-panel { color: #b8b8b2; }
  input { color: #f4f4f2; background: #242422; border-color: #55554f; }
  button { color: #171717; background: #f4f4f2; border-color: #f4f4f2; }
}
