:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  min-height: 34px;
}
button:hover,
.button:hover {
  background: var(--hover);
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}
.primary:hover {
  background: var(--primary-hover);
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.danger {
  color: var(--danger);
}
.small {
  font-size: 12px;
  padding: 3px 8px;
  min-height: 28px;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}
input,
select,
textarea {
  border: 1px solid var(--input-line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
  color: inherit;
  min-width: 0;
}
textarea {
  resize: vertical;
  width: 100%;
  line-height: 1.6;
  min-height: 140px;
}
input[type='checkbox'] {
  accent-color: var(--ink);
  width: 15px;
  height: 15px;
}
label {
  display: block;
  font-weight: 600;
  margin: 14px 0 5px;
}
label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin: 8px 0;
}
.field {
  width: 100%;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.55px;
  line-height: 1.3;
}
h2 {
  font-size: 18px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
}
code {
  font-size: 12px;
  background: var(--wash);
  padding: 2px 5px;
  border-radius: 4px;
}
.auth.auth-landing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 72px;
  align-items: center;
  max-width: 980px;
  min-height: 100svh;
  padding: 64px 36px;
  margin: 0 auto;
}
.auth-story .landing-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 42px;
  font-weight: 750;
  letter-spacing: -1.2px;
  line-height: 1.15;
  text-decoration: none;
}
.landing-logo img {
  width: 38px;
  height: 38px;
  flex: none;
}
.auth-story p.tagline {
  color: var(--ink);
  font:
    italic clamp(26px, 3vw, 32px)/1.18 Georgia,
    'Times New Roman',
    serif;
  margin: 24px 0 0 50px;
}
.auth-story .landing-description {
  margin: 16px 0 0 50px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.auth-story .landing-sentence {
  display: block;
}
.auth-panel {
  border-left: 1px solid var(--line);
  padding-left: 44px;
}
.auth-panel h1 {
  text-align: left;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
}
.auth-panel .invite-note {
  font-size: 12px;
  margin: 20px 0 0;
}
@media (max-width: 800px) {
  .auth.auth-landing {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
    max-width: 400px;
    padding: 48px 28px;
  }
  .auth-story .landing-logo {
    font-size: 38px;
    letter-spacing: -1px;
  }
  .landing-logo img {
    width: 34px;
    height: 34px;
  }
  .auth-story p.tagline {
    font-size: 26px;
    margin: 24px 0 0;
    text-wrap: balance;
  }
  .auth-story .tagline .landing-sentence {
    display: inline;
  }
  .auth-story .landing-description {
    margin-left: 0;
  }
  .auth-panel {
    border: 0;
    padding: 0;
  }
}

.auth-panel p {
  color: var(--muted);
  margin-top: 10px;
}
.auth-panel button.primary {
  width: 100%;
  margin-top: 24px;
}
.auth-panel input {
  padding: 9px 10px;
}
.auth-panel .field-note {
  font-size: 13px;
}
.auth-panel .field-note[role='alert'],
.auth-panel .error {
  color: var(--danger);
}
[aria-invalid='true'] {
  border-color: var(--danger);
}
.auth-panel .error {
  margin-top: 12px;
}
.error:empty {
  display: none;
}
button[aria-busy='true'] {
  cursor: progress;
}

@media (max-width: 800px) {
  .auth-panel input {
    font-size: 16px;
    min-height: 44px;
  }
  .auth-panel button {
    min-height: 44px;
  }
}
.auth-migration { margin-top: 24px; }
.auth-migration summary,.auth-recovery-help summary { cursor:pointer; color:var(--muted); }
.auth-migration p,.auth-recovery-help p { font-size:14px; line-height:1.5; color:var(--muted); }
.auth-recovery-help { margin-top:16px; font-size:13px; }
.auth-secondary { margin-top:12px; width:100%; border-color:transparent; background:transparent; color:var(--muted); }
.auth-account { overflow-wrap:anywhere; color:var(--muted); margin-bottom:16px; }
.auth-link-button { display:block; padding:12px; text-align:center; background:var(--ink); color:var(--on-ink); border-radius:6px; }
.auth-panel button[aria-busy=true]::after { content:''; display:inline-block; width:12px; height:12px; margin-left:8px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .auth-panel button[aria-busy=true]::after { animation:none; } }
