/* Shared styles for the login and signup pages. Matches the practice app: warm paper, thick ink outlines, hard shadows. */
:root {
  --paper: #f8f6f2; --sheet: #ffffff; --ink: #111111; --muted: #8a8780; --soft: #5d5a54;
  --orange: #e0583a; --blue: #cfe4fb; --green: #d4efd9; --green-ink: #1d7a3a;
  --red: #b3211c; --red-soft: #fdf1f0;
  --display: "Figtree", "Avenir Next", system-ui, sans-serif;
  --head: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --press: 4px 4px 0 var(--ink); --press-sm: 3px 3px 0 var(--ink);
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 400 18px/1.55 var(--display); -webkit-font-smoothing: antialiased;
  display: grid; grid-template-rows: auto 1fr;
}
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #2d70b3; outline-offset: 3px; }
[hidden] { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 22px/1 var(--head); letter-spacing: -.01em; }
.brand .mark { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 17px/1 var(--head); }
.back { color: var(--soft); font-weight: 600; font-size: 16px; text-decoration: none; border-bottom: 2px solid transparent; }
.back:hover { color: var(--orange); border-bottom-color: currentColor; }

.stage { display: grid; place-items: center; padding: 12px 20px 60px; }
.card {
  position: relative; width: 100%; max-width: 440px; background: var(--sheet);
  border: 2px solid var(--ink); border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); padding: 34px 32px 30px;
}
.card .tag {
  position: absolute; top: -16px; left: 26px; background: var(--blue); border: 2px solid var(--ink);
  border-radius: 999px; padding: 2px 14px; font-size: 14px; font-weight: 700;
}
.card.signup .tag { background: var(--green); }
h1 { margin: 0 0 6px; font: 800 36px/1.05 var(--head); letter-spacing: -.02em; }
.lede { margin: 0 0 24px; color: var(--soft); font-size: 17px; }

form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field .row { display: flex; justify-content: space-between; align-items: baseline; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; border: 2px solid var(--ink); border-radius: 14px; background: #fff;
  padding: 12px 14px; font-size: 17px; box-shadow: 0 3px 0 var(--ink); transition: box-shadow .1s, transform .1s;
}
input:focus { outline: none; box-shadow: 0 3px 0 var(--orange); border-color: var(--orange); }
input[aria-invalid="true"] { border-color: var(--red); }
.help { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 2px solid var(--ink); background: var(--orange); color: #fff; cursor: pointer;
  border-radius: 999px; padding: 13px 24px; font-weight: 700; font-size: 18px; line-height: 1.2;
  box-shadow: var(--press); transition: transform .08s, box-shadow .08s; margin-top: 4px;
}
.btn:hover:not(:disabled) { transform: translateY(1px); box-shadow: 0 3px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: #fff; color: var(--ink); }

.linkbtn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--soft); font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; }
.linkbtn:hover { color: var(--orange); border-bottom-color: currentColor; }

.msg { border: 2px solid var(--ink); border-radius: 14px; padding: 10px 14px; font-size: 16px; font-weight: 500; }
.msg.error { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.msg.ok { background: var(--green); color: var(--green-ink); border-color: var(--green-ink); }

.switch { margin: 22px 0 0; text-align: center; color: var(--soft); font-size: 16px; }
.switch a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--orange); }
.switch a:hover { color: var(--orange); }

@media (max-width: 520px) {
  .card { padding: 30px 20px 24px; border-radius: 20px; }
  h1 { font-size: 30px; }
}

.gbtn { margin-top: 0; gap: 12px; font-weight: 600; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: #e4e1da; }
