/* JobSpecCheck — light redesign tokens
   Forest green primary on warm-cool neutrals. Geist sans + Geist Mono.
   Balanced density for HR/legal professional buyers. */

:root {
  /* Surfaces */
  --bg:           #ffffff;
  --surface:      #fafaf9;       /* very subtle warm off-white */
  --surface-2:    #f5f5f4;
  --surface-3:    #efeeec;
  --tint:         #f3f7f3;       /* greenish tint for primary surfaces */

  /* Lines */
  --border:        #e7e5e4;
  --border-strong: #d6d3d1;
  --border-focus:  #166534;

  /* Text */
  --text:    #1c1917;
  --text-2:  #44403c;
  --text-3:  #78716c;
  --text-4:  #a8a29e;

  /* Brand — forest green */
  --primary-50:  #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;
  --primary-500: #22c55e;
  --primary-600: #16a34a;
  --primary-700: #15803d;
  --primary-800: #166534;
  --primary-900: #14532d;
  --primary:     #15803d;

  /* Status — muted, light theme */
  --success:     #15803d;
  --success-bg:  #f0fdf4;
  --warning:     #a16207;
  --warning-bg:  #fefce8;
  --danger:      #b91c1c;
  --danger-bg:   #fef2f2;
  --info:        #1d4ed8;
  --info-bg:     #eff6ff;

  /* Categorical (for charts) */
  --cat-1: #15803d;
  --cat-2: #1e3a8a;
  --cat-3: #a16207;
  --cat-4: #7c2d12;
  --cat-5: #5b21b6;

  /* Type */
  --font-sans: "Geist", -apple-system, "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-full: 999px;

  /* Shadows — light, restrained */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 10px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);

  /* Spacing scale (4px base) — used inline mostly */
}

/* ---------- Page base ---------- */
.jsc-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "ss03";
  letter-spacing: -0.005em;
}
.jsc-page * { box-sizing: border-box; }

/* ---------- Typography ---------- */
.jsc-display { font-size: 44px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }
.jsc-h1     { font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.jsc-h2     { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.jsc-h3     { font-size: 16px; line-height: 1.3;  letter-spacing: -0.01em;  font-weight: 600; }
.jsc-eyebrow{ font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.jsc-mono   { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.jsc-tnum   { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.jsc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  font: inherit; font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}
.jsc-btn-primary {
  background: var(--primary-800);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 1px 2px rgba(20, 83, 45, 0.25);
}
.jsc-btn-primary:hover { background: var(--primary-900); }
.jsc-btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.jsc-btn-secondary:hover { background: var(--surface-2); }
.jsc-btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.jsc-btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.jsc-btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: var(--border-strong);
}
.jsc-btn-danger:hover { background: var(--danger-bg); border-color: #fca5a5; }
.jsc-btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.jsc-btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------- Cards ---------- */
.jsc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.jsc-card-hd {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.jsc-card-bd { padding: 20px; }

/* ---------- Inputs ---------- */
.jsc-input, .jsc-select, .jsc-textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.jsc-textarea { height: auto; padding: 10px 12px; resize: vertical; }
.jsc-input:focus, .jsc-select:focus, .jsc-textarea:focus {
  outline: none;
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}
.jsc-input::placeholder, .jsc-textarea::placeholder { color: var(--text-4); }
.jsc-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.jsc-help  { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ---------- Pills / Badges ---------- */
.jsc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  line-height: 1.5;
}
.jsc-pill-neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.jsc-pill-success { background: var(--success-bg); color: var(--primary-800); border-color: #bbf7d0; }
.jsc-pill-warning { background: var(--warning-bg); color: var(--warning); border-color: #fde68a; }
.jsc-pill-danger  { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.jsc-pill-info    { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.jsc-pill-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* ---------- Tables ---------- */
.jsc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.jsc-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.jsc-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.jsc-table tbody tr:hover td { background: var(--surface); }
.jsc-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Divider / misc ---------- */
.jsc-hr { height: 1px; background: var(--border); border: 0; margin: 0; }
.jsc-kbd {
  font: 12px var(--font-mono);
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text-2);
  background: #fff;
}
.jsc-link { color: var(--primary-800); text-decoration: none; border-bottom: 1px solid transparent; }
.jsc-link:hover { border-bottom-color: var(--primary-800); }

/* ---------- Focus ring ---------- */
:focus-visible { outline: 2px solid var(--primary-700); outline-offset: 2px; }

/* Image placeholder used wherever a real asset is needed */
.jsc-placeholder {
  background: repeating-linear-gradient(
    45deg,
    var(--surface-2),
    var(--surface-2) 6px,
    var(--surface-3) 6px,
    var(--surface-3) 12px
  );
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font: 11px var(--font-mono);
  color: var(--text-3);
  text-align: center;
  padding: 12px;
}

/* ---------- Specificity overrides ----------
   The legacy dashboard.css styles bare element/attribute selectors
   (input[type=...], table, a, h1…) that can outrank the single-class jsc-*
   rules. Re-assert the design system under .jsc-page (two classes) so it wins
   wherever both stylesheets load. */
.jsc-page .jsc-input,
.jsc-page .jsc-select,
.jsc-page .jsc-textarea {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font: inherit;
}
.jsc-page .jsc-input:focus,
.jsc-page .jsc-select:focus,
.jsc-page .jsc-textarea:focus {
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
  outline: none;
}
.jsc-page .jsc-table { background: transparent; }
.jsc-page .jsc-table thead th { background: var(--surface); color: var(--text-3); }
.jsc-page .jsc-table tbody td { background: transparent; color: var(--text); }
.jsc-page a.jsc-link { color: var(--primary-800); }

/* ============================================================
   Responsive / mobile layer
   The app is built almost entirely with inline styles, so this
   layer reaches them with [style*="…"] attribute selectors and
   !important. Keep new full-bleed sections on the same 40px gutter
   / known font-size scale so they inherit these rules for free.
   ============================================================ */

/* --- Mobile nav scaffolding (topnav.html + marketing_header.html) --- */
.jsc-nav-toggle  { display: none; }
.jsc-mobile-menu { display: none; }
.jsc-mobile-menu a,
.jsc-mobile-menu button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 15px; text-align: left;
  color: var(--text); text-decoration: none;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.jsc-mobile-menu a:hover,
.jsc-mobile-menu button:hover { background: var(--surface-2); }
.jsc-mobile-menu .jsc-mm-sep   { height: 1px; background: var(--border); margin: 6px 6px; }
.jsc-mobile-menu .jsc-mm-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); padding: 12px 14px 4px; }

@media (max-width: 768px) {
  /* Guard against horizontal scroll from decorative absolute/overflowing elements */
  html, body { overflow-x: hidden; }

  /* Collapse every multi-column inline grid to a single column.
     min-width:0 lets the (now single) column shrink below its content's
     intrinsic width instead of blowing the page out horizontally. */
  .jsc-page [style*="grid-template-columns"]      { grid-template-columns: 1fr !important; }
  .jsc-page [style*="grid-template-columns"] > *  { min-width: 0; }

  /* Let horizontal button/action rows wrap instead of overflowing */
  .jsc-page [style*="display:flex"][style*="gap:12px"] { flex-wrap: wrap; }

  /* Tame oversized display type */
  .jsc-page [style*="font-size:64px"] { font-size: 38px !important; }
  .jsc-page [style*="font-size:56px"] { font-size: 34px !important; }
  .jsc-page [style*="font-size:44px"],
  .jsc-page .jsc-display              { font-size: 32px !important; }
  .jsc-page [style*="font-size:40px"] { font-size: 30px !important; }
  .jsc-page [style*="font-size:38px"] { font-size: 28px !important; }
  .jsc-page [style*="font-size:36px"] { font-size: 27px !important; }
  .jsc-page [style*="font-size:34px"] { font-size: 26px !important; }
  .jsc-page [style*="font-size:32px"],
  .jsc-page .jsc-h1                   { font-size: 25px !important; }

  /* Reduce big full-bleed section padding (40px side gutters → 20px) */
  .jsc-page [style*="padding:56px;"]          { padding: 32px 22px !important; } /* CTA inner card */
  .jsc-page [style*="padding:84px 40px 64px"] { padding: 44px 20px 36px !important; }
  .jsc-page [style*="padding:84px 40px 56px"] { padding: 44px 20px 32px !important; }
  .jsc-page [style*="padding:84px 40px 40px"] { padding: 44px 20px 28px !important; }
  .jsc-page [style*="padding:72px 40px"]      { padding: 44px 20px !important; }
  .jsc-page [style*="padding:64px 40px"]      { padding: 40px 20px !important; }
  .jsc-page [style*="padding:56px 40px"]      { padding: 36px 20px !important; }
  .jsc-page [style*="padding:48px 40px 28px"] { padding: 32px 20px 24px !important; }
  .jsc-page [style*="padding:48px 40px"]      { padding: 32px 20px !important; }
  .jsc-page [style*="padding:32px 40px 48px"] { padding: 28px 20px 36px !important; }

  /* Tighten header gutters */
  .jsc-page header[style*="padding:0 40px"],
  .jsc-page header[style*="padding:0 28px"] { padding-left: 16px !important; padding-right: 16px !important; }

  /* Nav: swap the desktop chrome for a hamburger + slide-down menu */
  .jsc-nav-desktop { display: none !important; }
  .jsc-nav-toggle  {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid var(--border); background: #fff;
    border-radius: 8px; cursor: pointer; color: var(--text);
  }
  .jsc-mobile-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 8px; z-index: 50;
    max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .jsc-mobile-menu.open { display: block; }

  /* Wide tables scroll horizontally instead of forcing page overflow */
  .jsc-page .jsc-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

  /* Auth split screen: drop the brand aside, let the form fill the width */
  .jsc-auth-aside { display: none !important; }
  .jsc-auth-form  { width: 100% !important; max-width: 380px; }

  /* Centered auth cards: fill the width instead of overflowing the viewport */
  .jsc-page [style*="width:400px"]  { width: 100% !important; max-width: 400px; }
  .jsc-page [style*="padding:40px"][style*="min-height:100vh"] { padding: 20px !important; }
}

