:root {
  color-scheme: dark;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  color: #f1eee6;
  background: #111110;
  --muted: #bfbab0;
  --line: #3c3a35;
  --surface: #1b1b19;
  --silver: #d3cec3;
  --focus: #eee0c5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  margin: 0;
  padding: clamp(16px, 5vw, 48px);
  background: radial-gradient(ellipse at 50% 0%, #302e29 0, transparent 64%), #111110;
}

main {
  width: min(100%, 450px);
  padding: clamp(22px, 6vw, 40px);
  border: 1px solid var(--line);
  border-top-color: #817c72;
  border-radius: 14px;
  background: linear-gradient(150deg, #262520, var(--surface) 55%);
  box-shadow: 0 18px 50px #0006;
}

.entry-brand {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.entry-mark {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #171715;
}

.entry-brand strong, .entry-brand span { display: block; }
.entry-brand strong { font-size: 1.125rem; line-height: 1.25; }
.entry-brand span { color: var(--muted); font-size: .875rem; margin-top: .18rem; }

h1 {
  margin: 1.35rem 0;
  font-size: clamp(1.55rem, 5vw, 2.05rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

p { color: var(--muted); margin: 1rem 0 0; line-height: 1.55; }
code { color: var(--silver); overflow-wrap: anywhere; }
label { display: block; margin-bottom: .5rem; font-weight: 600; }

input, button, #google {
  width: 100%;
  min-height: 44px;
  padding: .7rem .85rem;
  border: 1px solid #827d73;
  border-radius: 6px;
  font: inherit;
}

input { background: #161614; color: inherit; }

button, #google {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-color: #d8d2c6;
  background: linear-gradient(#eeeae0, #c3bdb1);
  color: #1b1916;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

form > button { margin-top: 1rem; }
form + #google { margin-top: 1rem; }
#personal-login input + label, #alternative-login, #code-login { margin-top: 1rem; }
#token-help, #code-help { margin-top: .5rem; font-size: .875rem; }
#alternative-login > summary { color: var(--silver); cursor: pointer; }
button:hover, #google:hover { background: #f8f4eb; }
button:disabled { opacity: .63; cursor: wait; }

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

p[role="alert"] { color: #ffc1b1; }
p[role="alert"]:empty { display: none; }

.oauth-consent main { width: min(100%, 530px); }
.oauth-consent h1 { margin-bottom: .65rem; }
.oauth-consent h1 + p { margin-top: 0; }

.permission-list {
  margin: 1.1rem 0 1.3rem;
  padding: .85rem 1rem .85rem 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171715;
  color: #e5e0d5;
  line-height: 1.45;
}

.permission-list li + li { margin-top: .45rem; }

.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-top: 1rem;
}

.consent-actions button[value="deny"] {
  color: var(--silver);
  border-color: #827d73;
  background: transparent;
}

.consent-actions button[value="deny"]:hover { background: #34312b; }
