/* Minimal institutional shell for the public site (Patch 25) -- same dark
   palette as the game's Terminal Financier design system, kept as its own
   small stylesheet since the full marketing site (Patch 27) will build this
   out considerably further. */
:root {
  --bg: #0b0e14;
  --surface: #121824;
  --surface-2: #182234;
  --border: #2a3346;
  --text-900: #e8ebf2;
  --text-600: #9aa4b8;
  --text-muted: #626c82;
  --accent: #3b82f6;
  --gold: #d97706;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
}
.site-logo { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; row-gap: 10px; }
.site-nav a { color: var(--text-600); text-decoration: none; font-size: 13.5px; }
.site-nav a:hover { color: var(--text-900); }
.site-nav-cta {
  background: var(--accent);
  color: #06120d;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.site-hero {
  padding: 100px 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.1), transparent 60%);
}
.site-hero h1 { font-size: clamp(26px, 5vw, 40px); font-weight: 800; margin: 0 0 16px; letter-spacing: -0.02em; line-height: 1.15; }
.site-hero p { font-size: 16px; line-height: 1.6; color: var(--text-600); max-width: 600px; margin: 0 auto 30px; }
.site-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 40px;
  flex-wrap: wrap;
}
.site-stat-value { font-size: 30px; font-weight: 800; color: var(--gold); }
.site-stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }
.site-form-shell {
  max-width: 440px;
  margin: 60px auto;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.site-form-shell h1 { font-size: 22px; margin: 0 0 6px; }
.site-form-shell p.sub { color: var(--text-muted); font-size: 13px; margin: 0 0 24px; }
.site-form-row { margin-bottom: 14px; }
.site-form-row label { display: block; font-size: 11.5px; color: var(--text-600); margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.site-form-row input, .site-form-row select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-900);
  font-size: 13px;
}
.site-form-error { color: #ef4444; font-size: 12px; min-height: 16px; margin-bottom: 8px; }
.site-form-success { color: #22c55e; font-size: 13px; margin-bottom: 8px; }
.site-btn {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #06120d;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.site-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.site-form-footer { margin-top: 16px; font-size: 12.5px; color: var(--text-muted); text-align: center; }
.site-form-footer a { color: var(--accent); }

/* Patch 27: full marketing site -- ticker, pillars, articles, careers engine */
.site-ticker {
  display: flex;
  overflow: hidden;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 12.5px;
}
.site-ticker-track { display: flex; animation: site-ticker-scroll 40s linear infinite; padding: 10px 0; }
.site-ticker-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 26px; border-right: 1px solid var(--border); }
.site-ticker-item .sym { color: var(--text-600); font-weight: 700; }
.site-ticker-item .up { color: #22c55e; }
.site-ticker-item .down { color: #ef4444; }
@keyframes site-ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.site-section { max-width: 1100px; margin: 0 auto; padding: 70px 40px; }
.site-section h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.01em; }
.site-section p.lead { color: var(--text-600); font-size: 14px; max-width: 640px; margin: 0 0 36px; }

.site-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.site-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) { .site-grid-4, .site-grid-2 { grid-template-columns: 1fr; } }

.site-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.site-card h3 { font-size: 15.5px; margin: 0 0 10px; }
.site-card p { font-size: 13px; color: var(--text-600); margin: 0; line-height: 1.5; }
.site-card .tag { display: inline-block; font-size: 10.5px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: 10px; }

.site-page-hero { padding: 60px 40px 20px; text-align: center; }
.site-page-hero h1 { font-size: 32px; margin: 0 0 12px; }
.site-page-hero p { color: var(--text-600); max-width: 640px; margin: 0 auto; font-size: 14.5px; }

.site-footer { border-top: 1px solid var(--border); padding: 30px 40px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* Careers engine */
.careers-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.careers-filters select, .careers-filters input {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-900);
  font-size: 13px;
}
.job-list { display: flex; flex-direction: column; gap: 10px; }
.job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.job-row:hover { border-color: var(--accent); }
.job-row .job-title { font-weight: 700; font-size: 14px; }
.job-row .job-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.job-row .job-cta { font-size: 12px; color: var(--accent); font-weight: 700; white-space: nowrap; margin-left: 16px; }
.job-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 40px; }

.job-modal-backdrop {
  position: fixed; inset: 0; background: rgba(4,6,10,0.7);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 60px 20px; z-index: 50;
}
.job-modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  max-width: 560px; width: 100%; padding: 32px;
}
.job-modal h2 { font-size: 19px; margin: 0 0 4px; }
.job-modal .job-modal-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 18px; }
.job-modal p.desc { font-size: 13px; color: var(--text-600); line-height: 1.6; margin-bottom: 22px; }
.job-modal-close { float: right; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; line-height: 1; }
textarea.site-form-textarea {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-900); font-size: 13px; font-family: inherit;
  min-height: 90px; resize: vertical;
}

/* Admin panel (Patch 26) */
.site-admin-shell { max-width: 1100px; margin: 40px auto; padding: 0 24px 60px; }
.site-admin-shell h1 { font-size: 24px; margin: 0 0 4px; }
.site-admin-shell p.sub { color: var(--text-muted); font-size: 13px; margin: 0 0 30px; }
.site-admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.site-admin-section h2 { font-size: 15px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-600); }
.site-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.site-admin-table th { text-align: left; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.site-admin-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.site-admin-table select, .site-admin-table input { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-900); font-size: 12.5px; }
.site-admin-table input[type="number"] { width: 90px; }
.site-btn-inline { padding: 6px 12px; border-radius: 6px; border: none; font-size: 12px; font-weight: 700; cursor: pointer; margin-right: 6px; }
.site-btn-approve { background: #22c55e; color: #06120d; }
.site-btn-reject { background: var(--surface-2); color: var(--text-600); border: 1px solid var(--border); }
.site-btn-revoke { background: #ef4444; color: #fff; }
.site-btn-save { background: var(--accent); color: #06120d; }
.site-status-chip { padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.site-status-PENDING_APPROVAL { background: rgba(217,119,6,0.15); color: var(--gold); }
.site-status-APPROVED { background: rgba(34,197,94,0.15); color: #22c55e; }
.site-status-REJECTED, .site-status-REVOKED { background: rgba(239,68,68,0.15); color: #ef4444; }
.site-admin-empty { color: var(--text-muted); font-size: 13px; padding: 8px 0; }

/* Server metrics bar + quick actions (Patch 37) */
.site-metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.site-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.site-metric-value { display: block; font-size: 20px; font-weight: 800; color: var(--gold); }
.site-metric-label { display: block; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 4px; }
.site-quickactions { white-space: nowrap; }
.site-btn-quick { background: var(--surface-2); color: var(--accent); border: 1px solid var(--accent); }

/* God Mode (Patch 32) */
.site-godmode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.site-godmode-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.site-godmode-card h3 { font-size: 13px; margin: 0 0 10px; }
.site-godmode-card label { display: block; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin: 8px 0 3px; }
.site-godmode-card input, .site-godmode-card select { width: 100%; padding: 7px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-900); font-size: 12.5px; box-sizing: border-box; }
.site-godmode-card button { margin-top: 12px; width: 100%; }
.site-godmode-hint { font-size: 11.5px; color: var(--text-muted); margin: 0 0 10px; }
.site-godmode-msg { font-size: 11.5px; margin-top: 8px; min-height: 14px; }

/* ---------- Responsive polish pass (Patch 37) ---------- */
/* Additive only, no base rule removed -- desktop layout unaffected below the
   breakpoints. Targets the gaps an audit found: fixed 40px side padding and a
   40px hero h1 didn't scale down, job-row and admin tables had no mobile
   stacking, and .site-header could overflow before it started wrapping. */
@media (max-width: 900px) {
  .site-section, .site-page-hero, .site-hero { padding-left: 24px; padding-right: 24px; }
  .site-hero { padding-top: 64px; padding-bottom: 64px; }
  .site-stats { gap: 32px; padding: 28px 24px; }
}

@media (max-width: 640px) {
  .site-header { padding: 14px 20px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 12.5px; }
  .site-section { padding: 44px 18px; }
  .site-section h2 { font-size: 21px; }
  .job-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .job-row .job-cta { margin-left: 0; }
  .careers-filters { padding: 14px; }
  .careers-filters select, .careers-filters input { flex: 1 1 140px; }
  .site-form-shell { margin: 32px auto; padding: 24px; max-width: calc(100% - 32px); }
  .site-admin-shell { padding: 0 14px 40px; }
  .site-admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .job-modal { padding: 22px; }
}
