/* Customer portal — minimal, matches public site palette.
 * Design-Claude can polish later. Goal: function-first, not pretty-first. */

:root {
  --paper:        oklch(0.985 0.008 80);
  --paper-2:      oklch(0.965 0.010 78);
  --paper-3:      oklch(0.945 0.011 76);
  --ink:          oklch(0.20 0.012 50);
  --ink-2:        oklch(0.36 0.012 55);
  --ink-3:        oklch(0.54 0.010 60);
  --ink-4:        oklch(0.68 0.009 65);
  --hairline:     oklch(0.86 0.010 70);
  --hairline-soft: oklch(0.92 0.008 70);
  --pos:          oklch(0.46 0.130 145);
  --pos-soft:     oklch(0.46 0.130 145 / 0.10);
  --neg:          oklch(0.50 0.180 28);
  --accent:       oklch(0.42 0.140 60);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --container: 720px;
  --r-md: 6px;
  --r-lg: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:    oklch(0.16 0.010 60);
    --paper-2:  oklch(0.19 0.010 60);
    --paper-3:  oklch(0.22 0.010 60);
    --ink:      oklch(0.96 0.005 80);
    --ink-2:    oklch(0.78 0.008 75);
    --ink-3:    oklch(0.62 0.008 70);
    --ink-4:    oklch(0.46 0.008 65);
    --hairline: oklch(0.30 0.012 60);
    --hairline-soft: oklch(0.24 0.012 60);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

a { color: inherit; transition: color .15s; }
a:hover { color: var(--accent); }

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.container {
  max-width: var(--container);
  padding: 0 24px;
  margin: 0 auto;
}

/* ---------- top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--paper);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

/* ---------- auth shell (login + thanks) ---------- */
.auth-shell {
  max-width: 440px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: left;
}

.auth-shell .brand {
  display: inline-block;
  margin-bottom: 56px;
  font-size: 16px;
}

/* ---------- typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.lede {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 48ch;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

/* ---------- forms ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: -6px;
}

.auth-form input[type="email"] {
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.auth-form input[type="email"]:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--ink) 8%, transparent);
}

.primary-button {
  padding: 14px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}

.primary-button:hover { opacity: 0.92; }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: 0.4; cursor: not-allowed; }

.ghost-button {
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.ghost-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.form-note {
  font-size: 13px;
  color: var(--ink-3);
  min-height: 1.4em;
  margin-top: 4px;
}

.form-note.success { color: var(--pos); }
.form-note.error   { color: var(--neg); }

.auth-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 13px;
  color: var(--ink-3);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer-secondary {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-3);
}

.auth-footer-secondary a {
  color: var(--ink-3);
  text-decoration: none;
}

.auth-footer-secondary a:hover { color: var(--ink); }

/* ---------- portal-page topnav ---------- */
.topnav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--ink-3);
}

.topnav a {
  color: var(--ink-3);
  text-decoration: none;
  transition: color .15s;
}

.topnav a:hover { color: var(--ink); }
.topnav a.active,
.topnav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

@media (max-width: 720px) {
  .topnav { display: none; }
}

/* ---------- portal ---------- */
.portal-main {
  padding: 56px 24px 64px;
}

.portal-main .lede {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
}

.card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.card-foot {
  margin: 16px 0 20px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ---------- entitlement list ---------- */
.entitlement-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entitlement-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--hairline-soft);
  font-size: 15px;
}

.entitlement-list li:last-child { border-bottom: none; }
.entitlement-list li.loading { color: var(--ink-3); font-style: italic; }
.entitlement-list li.empty { color: var(--ink-3); }

.entitlement-name {
  font-weight: 500;
}

.entitlement-detail {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}

.entitlement-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos);
}

.entitlement-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pos);
}

/* ---------- link list ---------- */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--hairline-soft);
}

.link-list li:last-child { border-bottom: none; }

.link-list a {
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
}

.link-list a:hover { color: var(--accent); }
