:root {
  --fg: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --accent: #b54708;
  --bg: #fafafa;
  --error: #c0392b;
  --ok: #2e7d32;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  line-height: 1.5;
}

main {
  max-width: 640px;
  min-width: 0;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 0.2rem;
}

h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 0;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.5rem 0 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}

textarea {
  min-height: 18rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.4;
}

.row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.field {
  flex: 1;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
}

legend {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0 0.25rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 400;
  margin-right: 1rem;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  filter: brightness(0.95);
}

button:focus-visible,
.button-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-header > div {
  min-width: 0;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.auth-card {
  padding: 2rem;
  text-align: center;
}

.button-link {
  display: inline-block;
  margin-top: 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-weight: 600;
}

.secondary {
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--border);
}

.identity-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.identity {
  font-weight: 650;
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
}

#save,
#save-resume {
  margin-top: 1rem;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

#status {
  text-align: center;
  font-weight: 600;
  min-height: 1.4rem;
}

#status.error {
  color: var(--error);
}

#status.ok {
  color: var(--ok);
}

[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .page-header,
  .row {
    align-items: stretch;
    flex-direction: column;
  }
}
