* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #1a1a1a; line-height: 1.5; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* Nav */
nav { background: #1a1a2e; color: #fff; padding: 12px 0; }
nav .container { display: flex; align-items: center; justify-content: space-between; }
nav .brand { font-size: 1.1em; font-weight: 700; color: #fff; }
nav .links a { color: #94a3b8; margin-left: 20px; font-size: 0.9em; }
nav .links a:hover, nav .links a.active { color: #fff; text-decoration: none; }

/* Cards */
.card { background: #fff; border-radius: 6px; padding: 20px; margin-bottom: 16px; border: 1px solid #e2e8f0; }
.card h2 { font-size: 1.1em; margin-bottom: 12px; color: #334155; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
th { text-align: left; padding: 8px 10px; background: #f8fafc; border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #475569; }
td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; }
tr:hover td { background: #f8fafc; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 0.8em; font-weight: 600; }
.badge-pass { background: #dcfce7; color: #166534; }
.badge-marginal { background: #fef9c3; color: #854d0e; }
.badge-fail { background: #fee2e2; color: #991b1b; }
.badge-buy { background: #dbeafe; color: #1e40af; }
.badge-fair { background: #f0fdf4; color: #166534; }
.badge-over { background: #fee2e2; color: #991b1b; }
.badge-favorable { background: #dcfce7; color: #166534; }
.badge-neutral { background: #fef9c3; color: #854d0e; }
.badge-unfavorable { background: #fee2e2; color: #991b1b; }
.badge-mode1 { background: #e0e7ff; color: #3730a3; }
.badge-mode2 { background: #fce7f3; color: #9d174d; }

/* Stats row */
.stats { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 140px; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 16px; }
.stat .label { font-size: 0.8em; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 1.5em; font-weight: 700; color: #1e293b; }

/* Login */
.login-box { max-width: 360px; margin: 80px auto; }
.login-box input { width: 100%; padding: 10px; margin-bottom: 12px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.95em; }
.login-box button { width: 100%; padding: 10px; background: #2563eb; color: #fff; border: none; border-radius: 4px; font-size: 0.95em; cursor: pointer; }
.login-box button:hover { background: #1d4ed8; }
.error { color: #dc2626; font-size: 0.9em; margin-bottom: 10px; }

/* Analysis detail */
.analysis-content { font-size: 0.9em; line-height: 1.7; }
.analysis-content h1 { font-size: 1.3em; margin-bottom: 8px; }
.analysis-content h2 { font-size: 1.1em; margin: 16px 0 8px; color: #334155; }
.analysis-content h3 { font-size: 1em; margin: 12px 0 6px; }
.meta { font-size: 0.85em; color: #64748b; margin-bottom: 16px; }

/* Criteria table */
.criteria-table td:nth-child(3) { text-align: center; }

/* Page header */
.page-header { margin-bottom: 20px; }
.page-header h1 { font-size: 1.4em; color: #1e293b; }
.page-header p { color: #64748b; font-size: 0.9em; }

/* Responsive */
@media (max-width: 768px) {
  .stats { flex-direction: column; }
  table { font-size: 0.8em; }
  th, td { padding: 6px; }
}
