/* AI Career Suite — Professional theme (per audit design spec) */
:root {
  --primary: #1e3a8a;      /* Professional Dark Blue */
  --primary-600: #1d4ed8;
  --secondary: #6366f1;    /* Purple accent */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --bg: #f9fafb;           /* Light Gray */
  --surface: #ffffff;
  --ink: #1f2937;          /* Dark Gray text */
  --muted: #6b7280;        /* Medium Gray */
  --line: #e5e7eb;
  --line-2: #eef1f5;
  --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.06);
  --shadow-lg: 0 10px 25px rgba(16,24,40,.10);
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6; font-size: 15px;
}
h1, h2, h3, h4, .brandfont { font-family: "Poppins", "Inter", system-ui, sans-serif; }
a { color: var(--primary-600); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(99,102,241,.45); outline-offset: 2px; border-radius: 4px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .logo { font-family: "Poppins"; font-weight: 700; font-size: 19px; color: var(--primary); display: flex; gap: 8px; align-items: center; }
.topbar nav a { color: var(--ink); font-weight: 600; font-size: 14px; margin-left: 6px; padding: 8px 14px; border-radius: 999px; }
.topbar nav a:hover { background: #eef2ff; color: var(--primary); text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 12px 20px 64px; }

/* ---------- Landing hero ---------- */
.hero { text-align: center; padding: 56px 0 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: #eef2ff; color: var(--primary); border: 1px solid #dbe1ff; font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 14px; letter-spacing: -0.02em; color: #0f172a; }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 22px; margin-top: 40px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.tool-card .emoji { font-size: 26px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px; background: #eef2ff; }
.tool-card h3 { margin: 14px 0 8px; font-size: 20px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 14px; }
.tool-card .go { margin-top: 16px; font-weight: 700; color: var(--primary-600); }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.feature-row .chip { background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 26px; margin-top: 20px; }
.panel h2 { margin: 0 0 4px; font-size: 22px; }
.panel .sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px){ .grid2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 6px; color: #374151; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
textarea, input[type="text"], select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r); padding: 11px 13px;
  font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  border: 0; border-radius: var(--r); padding: 11px 20px; font-weight: 600; font-size: 14.5px; cursor: pointer;
  background: var(--primary); color: #fff; box-shadow: var(--shadow); transition: background .15s, transform .1s, box-shadow .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--primary-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #eef2ff; color: var(--primary); }
.btn.secondary:hover { background: #e0e7ff; }
.btn.ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: #f8fafc; border-color: #c7d2fe; }
.btn.success { background: var(--success); }
.btn.success:hover { background: #059669; }
.btn.big { padding: 14px 26px; font-size: 15px; width: 100%; justify-content: center; margin-top: 4px; }

/* Accent swatches */
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.active { box-shadow: 0 0 0 2px var(--primary); }
input[type="color"] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }

/* Customize panel */
.customize { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 18px; }
.cz-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cz-row > label:first-child { min-width: 96px; margin: 0; }
.cz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 12px; }
.cz-grid label { display: flex; justify-content: space-between; align-items: baseline; }
.seg.wrapseg { flex-wrap: wrap; max-width: 100%; }
input[type="range"] { width: 100%; accent-color: var(--primary); }

/* Segmented control (template picker) */
.seg { display: inline-flex; background: #eef2ff; border-radius: var(--r); padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 6px; cursor: pointer; }
.seg button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

/* ---------- Toasts ---------- */
.toast { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); font-size: 14px; display: none; animation: fade .25s ease; }
.toast.show { display: block; }
.toast.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.toast.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
@keyframes fade { from{opacity:0; transform:translateY(4px)} to{opacity:1} }

/* ---------- Progress ---------- */
.progress-wrap { margin-top: 16px; display: none; }
.progress-wrap.show { display: block; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress { height: 10px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .3s ease; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Steps chips */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin: -2px 0 18px; }
.steps .step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #475569; background: #f1f5f9; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.steps .step b { width: 19px; height: 19px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 11px; }

/* ---------- Results / previews ---------- */
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.pdf-preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--r); background: #f1f5f9; }
.doc-title { font-weight: 700; font-size: 15px; margin: 22px 0 4px; color: var(--ink); }

/* ---------- Score cards / meters ---------- */
.score-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
@media (max-width: 640px){ .score-cards { grid-template-columns: 1fr; } }
.score-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; background: #fff; }
.score-card h4 { margin: 0 0 8px; font-size: 14px; color: #374151; }
.score-num { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; font-family: "Poppins"; }
.meter { height: 12px; border-radius: 999px; background: #eef1f5; overflow: hidden; margin: 8px 0; }
.meter > span { display: block; height: 100%; width: 0%; border-radius: 999px; transition: width .7s ease; background: var(--primary); }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.low { background: #dcfce7; color: #166534; }
.badge.mid { background: #fef3c7; color: #92400e; }
.badge.high { background: #fee2e2; color: #991b1b; }
.badge.hum { background: #d1fae5; color: #065f46; }

ul.clean { margin: 8px 0 0; padding-left: 18px; }
ul.clean li { margin: 5px 0; font-size: 14px; color: #374151; }
h4 { font-size: 15px; margin: 18px 0 6px; }
mark { background: #fde68a; padding: 0 2px; border-radius: 3px; }

/* Humanize side-by-side */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
@media (max-width: 720px){ .compare { grid-template-columns: 1fr; } }
.compare .col { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.compare .col header { padding: 10px 14px; font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.compare .col.orig header { background: #fef2f2; color: #991b1b; }
.compare .col.new header { background: #ecfdf5; color: #065f46; }
.compare .col .txt { padding: 14px; font-size: 14px; white-space: pre-wrap; max-height: 320px; overflow: auto; line-height: 1.6; color: #1f2937; }
.metrics-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.metric { flex: 1; min-width: 130px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; }
.metric .k { font-size: 12px; color: var(--muted); }
.metric .v { font-size: 22px; font-weight: 800; font-family: "Poppins"; }
.metric .v.down { color: var(--success); }

.callout { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: var(--r); padding: 12px 14px; font-size: 13.5px; margin-top: 8px; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-600); font-weight: 600; font-size: 14px; margin-top: 4px; }
