.tps-app {
  --ink: #403731;
  --muted: #746a63;
  --brand: #403731;
  --brand-hover: #2f2925;
  --accent: #c8b9a6;
  --accent-light: #eee8e1;
  --soft: #f8f5f1;
  --line: #e4dcd2;
  max-width: 940px;
  margin: 32px auto;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.8;
  direction: rtl !important;
  text-align: right !important;
}
.tps-app * { box-sizing: border-box; }
.tps-app form,.tps-app article,.tps-app section,.tps-app header,.tps-app fieldset,.tps-app legend,.tps-app label,.tps-app details,.tps-app summary,.tps-app dl,.tps-app dt,.tps-app dd {
  direction: rtl;
  text-align: right;
}
.tps-app input,.tps-app select,.tps-app textarea,.tps-app button { font-family: Tahoma, Arial, sans-serif; }
.tps-app input:not([type="email"]):not([type="password"]),.tps-app select,.tps-app textarea { direction: rtl; text-align: right; }
.tps-app input[type="email"],.tps-app input[type="password"] { direction: ltr; text-align: left; unicode-bidi: isolate; }
.tps-app bdi,.tps-code > bdi { direction: ltr; unicode-bidi: isolate; }
.tps-app [hidden] { display: none !important; }
.tps-app #tps-next:disabled { display: none !important; pointer-events: none; }
.tps-app #tps-submit:disabled { display: inline-block !important; opacity: .72; cursor: wait; pointer-events: none; }
.tps-app a.tps-btn { display: inline-block; text-decoration: none; }
.tps-hero,.tps-panel,.tps-report {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 38px rgba(64,55,49,.08);
}
.tps-hero { background: linear-gradient(135deg,#f3eee8 0%,#fff 72%); }
.tps-kicker { color: #7c695b; font-weight: 700; }
.tps-hero h2 { margin: 5px 0; color: var(--brand); font-size: 27px; }
.tps-hero p,.tps-consent,.tps-bar-row span,.tps-notice { color: var(--muted); }
.tps-hero p { margin: 0; }
.tps-progress-wrap { margin: 24px 5px; }
.tps-progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.tps-progress { height: 9px; overflow: hidden; background: var(--accent-light); border-radius: 20px; }
.tps-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--accent),var(--brand)); transition: .3s; }
.tps-draft-note { display:flex; justify-content:space-between; gap:12px; align-items:center; margin:-10px 5px 18px; padding:9px 13px; border:1px dashed var(--accent); border-radius:10px; color:var(--muted); background:var(--soft); font-size:12px; }
.tps-draft-note button { border:0; background:none; color:var(--brand); font:inherit; font-weight:700; cursor:pointer; }
.tps-step { display: none; }
.tps-step.is-active { display: block; }
.tps-panel h3 { margin-top: 0; color: var(--brand); }
.tps-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tps-fields label { font-weight: 700; }
.tps-fields input,.tps-fields select {
  width: 100%; margin-top: 7px; padding: 12px;
  border: 1px solid #d7cdc2; border-radius: 10px; background: #fff; color: var(--ink); font: inherit;
}
.tps-fields input:focus,.tps-fields select:focus { outline: 2px solid rgba(200,185,166,.55); border-color: var(--brand); }
.tps-full { grid-column: 1/-1; }
.tps-consent { display: flex; gap: 8px; margin-top: 20px; }
.tps-section-head { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tps-question { margin: 0; padding: 22px 0; border: 0; border-bottom: 1px solid var(--line); }
.tps-question:last-child { border: 0; }
.tps-question legend { width: 100%; color: var(--ink); font-size: 16px; }
.tps-question legend b {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 9px;
  background: var(--accent-light); border-radius: 50%; color: var(--brand);
}
.tps-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 14px; }
.tps-options input { position: absolute; opacity: 0; }
.tps-options span {
  display: block; padding: 10px; border: 1px solid #ddd3c8; border-radius: 9px;
  background: #fff; text-align: center; font-size: 12px; cursor: pointer; transition: .18s;
}
.tps-options span:hover { background: var(--soft); border-color: var(--accent); }
.tps-options input:focus + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tps-options input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.tps-values-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; }
.tps-value { margin:0; padding:14px; border:1px solid var(--line); border-radius:12px; }
.tps-value legend { padding:0 5px; color:var(--brand); font-weight:700; }
.tps-value > div { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; }
.tps-value input,.tps-check-grid input { position:absolute; opacity:0; }
.tps-value span,.tps-check-grid span { display:block; padding:7px 4px; border:1px solid var(--line); border-radius:8px; text-align:center; font-size:10px; cursor:pointer; }
.tps-value input:checked + span,.tps-check-grid input:checked + span { background:var(--brand); border-color:var(--brand); color:#fff; }
.tps-check-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:22px; }
.tps-check-grid span { padding:12px; font-size:12px; }
.tps-profile-fields select { width:100%; }
.tps-actions { display: flex; justify-content: space-between; margin-top: 18px; }
.tps-btn {
  padding: 12px 22px; border: 0; border-radius: 10px; background: var(--brand); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; transition: .18s; text-align:center;
}
.tps-btn:hover { background: var(--brand-hover); color: #fff; transform: translateY(-1px); }
.tps-btn-muted { background: var(--accent-light); color: var(--ink); }
.tps-btn-muted:hover { background: var(--accent); color: var(--ink); }
.tps-error { margin-top: 15px; color: #a23b32; font-weight: 700; }
.tps-report-top { display: flex; justify-content: space-between; gap: 25px; }
.tps-report-top h2 { margin: 5px 0; color: var(--brand); }
.tps-report-top h2 { unicode-bidi: plaintext; }
.tps-code {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 130px; height: 130px; border: 7px solid var(--accent-light); border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 34px; font-weight: 800;
}
.tps-code small { font-size: 11px; }
.tps-bars { display: grid; gap: 12px; }
.tps-bar-row { display: grid; grid-template-columns: 140px 1fr 50px; align-items: center; gap: 12px; }
.tps-bar-row > div:first-child { display: flex; justify-content: space-between; }
.tps-bar { height: 12px; overflow: hidden; background: var(--accent-light); border-radius: 10px; }
.tps-bar i { display: block; height: 100%; border-radius: 10px; }
.tps-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.tps-report-grid section,.tps-ai { padding: 18px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; }
.tps-report-grid h3,.tps-ai h3 { margin-top: 0; color: var(--brand); }
.tps-personality { margin-top: 26px; padding: 24px; background: linear-gradient(135deg,#f3eee8,#fff); border: 1px solid var(--line); border-radius: 18px; }
.tps-confidence { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:22px; padding:16px; background:var(--soft); border:1px solid var(--line); border-radius:14px; }
.tps-confidence > div { display:flex; flex-direction:column; }
.tps-confidence span { color:var(--muted); font-size:11px; }
.tps-confidence p { grid-column:1/-1; margin:0; color:var(--muted); font-size:12px; }
.tps-personality-label { display: inline-block; padding: 3px 10px; background: var(--brand); border-radius: 20px; color: #fff; font-size: 11px; }
.tps-personality > h3 { margin: 10px 0 5px; color: var(--brand); }
.tps-personality-intro { margin-top: 0; color: var(--muted); }
.tps-personality-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tps-personality-grid > div { padding: 15px; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 12px; }
.tps-personality-grid h4 { margin: 0 0 7px; color: var(--brand); }
.tps-personality-grid p,.tps-personality-grid ul,.tps-personality-grid ol { margin: 0; padding-right: 20px; font-size: 13px; }
.tps-occupations { margin-top: 24px; }
.tps-section-intro { margin-top:-8px; color:var(--muted); font-size:13px; }
.tps-occupations > h3 { color: var(--brand); }
.tps-job-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tps-job-card { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.tps-job-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tps-job-head h4 { margin: 0; color: var(--brand); font-size: 16px; }
.tps-job-head h4,.tps-job-card small { unicode-bidi: plaintext; }
.tps-job-head span { padding: 3px 8px; background: var(--accent-light); border-radius: 20px; color: var(--brand); font-size: 11px; font-weight: 700; white-space: nowrap; }
.tps-job-card p { margin: 9px 0; color: var(--muted); font-size: 13px; }
.tps-job-card small { color: var(--ink); }
.tps-match-parts { display:flex; flex-wrap:wrap; gap:5px; margin:9px 0; }
.tps-match-parts span { padding:3px 7px; background:var(--soft); border:1px solid var(--line); border-radius:12px; color:var(--muted); font-size:10px; }
.tps-ai-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.tps-job-details { margin-top:14px; border-top:1px solid var(--line); }
.tps-job-details summary { padding-top:11px; color:var(--brand); font-weight:700; cursor:pointer; }
.tps-job-details dl {
  display:block !important; width:100% !important; margin:10px 0 0 !important;
  padding:0 !important; border:0 !important; direction:rtl !important; text-align:right !important;
}
.tps-job-details dt {
  display:block !important; float:none !important; clear:both !important; width:100% !important;
  margin:10px 0 0 !important; padding:0 !important; border:0 !important;
  color:var(--brand); font-size:12px; font-weight:700; direction:rtl !important; text-align:right !important;
}
.tps-job-details dd {
  display:block !important; float:none !important; clear:both !important; width:100% !important;
  margin:2px 0 0 !important; padding:0 0 10px !important; border:0 !important; border-bottom:1px solid var(--line) !important;
  color:var(--muted); font-size:12px; direction:rtl !important; text-align:right !important;
}
.tps-job-details dd:last-child { border-bottom:0 !important; padding-bottom:0 !important; }
.tps-roadmap { margin-top:26px; padding:22px; border-radius:18px; background:var(--brand); color:#fff; }
.tps-roadmap > span { color:var(--accent); font-size:12px; font-weight:700; }
.tps-roadmap h3 { margin:4px 0 15px; color:#fff; }
.tps-roadmap-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.tps-roadmap-grid article { padding:14px; border:1px solid rgba(255,255,255,.18); border-radius:12px; background:rgba(255,255,255,.07); }
.tps-roadmap-grid p { margin:6px 0 0; color:#f3eee8; font-size:12px; }
.tps-share-card-data { display:none; }
.tps-job-meter { height: 5px; margin-top: 10px; overflow: hidden; background: var(--accent-light); border-radius: 10px; }
.tps-job-meter i { display: block; height: 100%; background: linear-gradient(90deg,var(--accent),var(--brand)); border-radius: 10px; }
.tps-notice { padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.tps-report-actions { display: flex; gap: 10px; flex-wrap:wrap; }
.tps-print-toolbar {
  --brand: #403731; --brand-hover: #2f2925;
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 14px;
  width: min(940px,calc(100% - 24px)); margin: 12px auto -18px; padding: 12px 16px;
  border: 1px solid #e4dcd2; border-radius: 14px; background: rgba(255,255,255,.96);
  box-shadow: 0 8px 24px rgba(64,55,49,.12); direction: rtl; text-align: right;
  font-family: Tahoma,Arial,sans-serif; color: #403731;
}
.tps-print-toolbar p { margin: 0; color: #746a63; font-size: 12px; }
.tps-print-toolbar .tps-btn { flex: 0 0 auto; }
@media (max-width:700px) {
  .tps-hero,.tps-panel,.tps-report { padding: 20px; border-radius: 14px; }
  .tps-fields,.tps-report-grid,.tps-job-list,.tps-personality-grid,.tps-roadmap-grid,.tps-values-grid,.tps-confidence,.tps-ai-grid { grid-template-columns: 1fr; }
  .tps-confidence p { grid-column:auto; }
  .tps-value > div { grid-template-columns:1fr; }
  .tps-check-grid { grid-template-columns:1fr 1fr; }
  .tps-draft-note { align-items:flex-start; flex-direction:column; }
  .tps-options { grid-template-columns: 1fr 1fr; }
  .tps-report-top { display: block; }
  .tps-code { margin: 15px auto; }
  .tps-bar-row { grid-template-columns: 100px 1fr 42px; }
  .tps-section-head { display: block; }
  .tps-print-toolbar { align-items: stretch; flex-direction: column; margin-bottom: -20px; }
  .tps-print-toolbar p { text-align: center; }
}
@media print {
  .tps-report-top { background: linear-gradient(135deg,#403731,#8f7c6d) !important; color:#fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tps-report-top h2, .tps-report-top p, .tps-report-top span { color:#fff !important; }
  .tps-personality { background: linear-gradient(135deg,#f7efe7,#ffffff) !important; border-color:#c8b9a6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tps-job-card { background:#fffaf5 !important; border-color:#d9c5ad !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tps-roadmap { background:linear-gradient(135deg,#403731,#aa9685) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body * { visibility: hidden; }
  .tps-report,.tps-report * { visibility: visible; }
  .tps-report { position: absolute; inset: 0; width: 100%; border: 0; box-shadow: none; }
  .tps-report-actions,.tps-print-toolbar { display: none !important; }
  .tps-app { max-width: none; margin: 0; }
  .tps-job-card,.tps-personality,.tps-report-grid section,.tps-roadmap { break-inside: avoid; page-break-inside: avoid; }
  @page { size: A4; margin: 12mm; }
}
