/*
 * Shared portal chrome.
 * Linked as the first stylesheet on every client-facing portal page
 * (sign_in, auth_consume, link_error, constitution).
 * Constitution also loads constitution.css on top for its layout.
 */

:root {
  --color-bg: #f5f5f3;
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-accent: #d97706;
  --color-accent-hover: #b45309;
  --radius-lg: 12px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--color-accent-hover); }

/* --- Form control baseline ------------------------------------------- */
input, select, textarea, button {
  font: inherit;
  font-size: 1rem;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="email"], input[type="text"], textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  transition: all 0.15s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2);
}
button:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3); }
button:active { transform: translateY(0); }

/* --- .portal-auth-wrap / .portal-auth-card --------------------------- */
.portal-auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.portal-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 32px;
  display: grid;
  gap: 20px;
}

.portal-auth-card h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.portal-auth-card p { color: var(--color-text-muted); font-size: 0.95rem; }

/* --- Mobile refinements ---------------------------------------------- */
@media (max-width: 640px) {
  .portal-auth-wrap { padding: 20px; justify-content: flex-start; margin-top: 40px; }
  .portal-auth-card { border: none; box-shadow: none; padding: 0; background: transparent; }
}
