:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1a1a2e;
    --muted: #5c6370;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #e2e8f0;
    --error-bg: #fef2f2;
    --error-text: #b91c1c;
    --warn-bg: #fffbeb;
    --warn-text: #b45309;
  }
  
  * { box-sizing: border-box; }
  
  body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
  }
  
  .container { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
  
  .site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
  }
  
  .site-header h1 { margin: 0; font-size: 1.5rem; }
  .site-header a { color: inherit; text-decoration: none; }
  .subtitle { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }
  
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  fieldset {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  legend { font-weight: 600; padding: 0 0.25rem; }
  
  label { display: block; margin-bottom: 0.75rem; font-size: 0.95rem; }
  
  textarea, input[type="text"], input[type="number"], input[type="file"] {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
  }
  
  .rules-toggle { display: flex; gap: 1rem; margin-bottom: 0.75rem; }
  .rules-panel.hidden { display: none; }
  
  .weight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
  }
  
  .btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.65rem 1.2rem;
    border-radius: 6px;
    border: none;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
  }
  
  .btn-primary { background: var(--primary); color: #fff; }
  .btn-primary:hover { background: var(--primary-hover); }
  
  .btn-secondary { background: #e2e8f0; color: var(--text); }
  
  .alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
  .alert-error { background: var(--error-bg); color: var(--error-text); }
  
  .badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.85rem; }
  .badge-warn { background: var(--warn-bg); color: var(--warn-text); }
  
  pre {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.85rem;
  }
  
  .resume-item { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
  .results-header { display: flex; flex-direction: column; gap: 0.5rem; }
  