/* CV readiness check on the home page, placed after the hero. Classes are prefixed rd- to avoid clashes. */

.rd { padding: 3.5rem 0; background: #fff; border-bottom: 1px solid #e1e8ed; }
.rd-kicker { color: #1d4ed8; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; text-align: center; }
.rd h2 { font-size: 2rem; line-height: 1.2; color: #1a1a1a; margin-bottom: 0.6rem; }
.rd .section-sub { max-width: 720px; color: #444; margin: 0 auto 1.75rem; text-align: center; }
.rd h3 { font-size: 1.15rem; color: #1a1a1a; margin-bottom: 0.6rem; }
.rd h4 { font-size: 0.95rem; color: #1a1a1a; margin: 1rem 0 0.3rem; }
.rd a { color: #1d4ed8; }

.rd-card { background: #f5f7fa; border: 1px solid #e1e8ed; border-radius: 16px; padding: 1.5rem; max-width: 760px; margin: 0 auto; }
.rd-limit { font-size: 0.95rem; color: #333; margin-bottom: 1rem; }
.rd-drop {
  display: block;
  position: relative;
  border: 2px dashed #b9c7d6;
  border-radius: 14px;
  padding: 1.4rem 1rem;
  text-align: center;
  background: #fff;
  cursor: pointer;
}
.rd-drop:focus-within { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.rd-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.rd-drop-title { display: block; font-weight: 700; color: #1a1a1a; }
.rd-drop-sub { display: block; font-size: 0.9rem; color: #555; margin-top: 0.3rem; overflow-wrap: anywhere; }
.rd-consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 9pt; color: #333; margin: 1rem 0; line-height: 1.45; }
.rd-consent input { margin-top: 0.3rem; flex: 0 0 auto; }
.rd-submit { display: inline-block; }
.rd-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.rd-status { margin-top: 0.8rem; font-size: 0.95rem; color: #333; min-height: 1.4em; }
.rd-status.is-error { color: #b42318; font-weight: 600; }
.rd-working { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; color: #1d4ed8; font-weight: 600; }
.rd-spinner { width: 16px; height: 16px; border: 2px solid #bfd3ff; border-top-color: #1d4ed8; border-radius: 50%; animation: rd-spin 0.8s linear infinite; flex: 0 0 auto; }
.rd-dots { display: inline-flex; gap: 3px; align-items: center; }
.rd-dots i { width: 5px; height: 5px; border-radius: 50%; background: #1d4ed8; display: block; animation: rd-bounce 1.2s ease-in-out infinite; }
.rd-dots i:nth-child(2) { animation-delay: 0.15s; }
.rd-dots i:nth-child(3) { animation-delay: 0.3s; }
.rd-elapsed { color: #555; font-weight: 400; font-size: 0.9rem; }
@keyframes rd-spin { to { transform: rotate(360deg); } }
@keyframes rd-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rd-spinner, .rd-dots i { animation-duration: 3s; } }
.rd-signup { margin-top: 1rem; background: #fff; border-left: 3px solid #1d4ed8; border-radius: 10px; padding: 0.9rem 1rem; font-size: 0.95rem; color: #333; }

.rd [hidden] { display: none !important; }
.rd-save-note { font-size: 0.92rem; color: #333; background: #fff; border-left: 3px solid #1d4ed8; border-radius: 10px; padding: 0.7rem 0.9rem; margin: 0 0 1rem; }
.rd-save-note a { font-weight: 700; }

/* Progress bar: fills to about 90% while the check runs, then the result replaces it */
.rd-progress { height: 8px; background: #dbe4f0; border-radius: 99px; overflow: hidden; margin-top: 0.9rem; }
.rd-progress span { display: block; height: 100%; width: 0; background: #1d4ed8; border-radius: 99px; transition: width 1s linear; }
.rd-working-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.rd-working-note { display: block; font-weight: 400; font-size: 0.85rem; color: #555; margin-top: 0.3rem; }

/* Saved checks */
.rd-history { margin: 0 0 2rem; max-width: 760px; }
.rd-history h3 { margin-bottom: 0.2rem; }
.rd-history-note { font-size: 0.9rem; color: #555; margin-bottom: 0.7rem; }
.rd-history-list { list-style: none; display: grid; gap: 0.5rem; }
.rd-history-item { width: 100%; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: center; text-align: left; background: #fff; border: 1px solid #e1e8ed; border-radius: 12px; padding: 0.8rem 1rem; cursor: pointer; font: inherit; color: #222; }
.rd-history-item:hover, .rd-history-item:focus-visible { border-color: #1d4ed8; outline: none; }
.rd-history-date { color: #555; font-size: 0.9rem; }
.rd-history-file { font-weight: 600; overflow-wrap: anywhere; }
.rd-history-score { font-weight: 700; color: #1d4ed8; }
.rd-history-top { color: #555; font-size: 0.9rem; }

/* Results */
.rd-results { margin-top: 2.5rem; }
.rd-results[hidden], .rd-expert[hidden], .rd-signup[hidden] { display: none !important; }
.rd-score-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 2rem; align-items: center; background: #fff; border: 1px solid #e1e8ed; border-radius: 16px; padding: 1.5rem; }
.rd-gauge { position: relative; width: 160px; height: 160px; }
.rd-gauge svg { width: 160px; height: 160px; transform: rotate(-90deg); }
.rd-gauge-track { stroke: #e1e8ed; }
.rd-gauge-value { stroke: #1d4ed8; transition: stroke-dashoffset 0.8s ease; }
.rd-gauge-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rd-gauge-num { font-size: 2.4rem; font-weight: 800; color: #1a1a1a; line-height: 1; }
.rd-gauge-of { font-size: 0.85rem; color: #555; }
.rd-score-text p { color: #444; font-size: 0.98rem; margin-bottom: 0.6rem; }
.rd-subscores { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.rd-subscores span { background: #eef4ff; color: #1d4ed8; border-radius: 99px; padding: 0.3rem 0.8rem; font-size: 0.88rem; font-weight: 600; }

.rd-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.rd-box { background: #fff; border: 1px solid #e1e8ed; border-radius: 14px; padding: 1.25rem; min-width: 0; }
.rd-box ul, .rd-box ol { margin-left: 1.2rem; color: #333; font-size: 0.95rem; }
.rd-box li { margin: 0.35rem 0; line-height: 1.5; }

.rd-markets { list-style: none; margin-left: 0 !important; }
.rd-markets li { margin: 0 0 1rem; }
.rd-market-head { display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 700; color: #1a1a1a; }
.rd-market-why { font-size: 0.9rem; color: #555; margin: 0.25rem 0 0.4rem; }
.rd-bar { height: 10px; background: #e1e8ed; border-radius: 99px; overflow: hidden; }
.rd-bar span { display: block; height: 100%; background: #1d4ed8; border-radius: 99px; }

.rd-checks { list-style: none; margin-left: 0 !important; }
.rd-checks li { position: relative; padding-left: 1.7rem; }
.rd-checks li::before { content: '\2715'; position: absolute; left: 0; top: 0; color: #b42318; font-weight: 700; }
.rd-checks li.is-pass::before { content: '\2713'; color: #067647; }
.rd-checks .rd-tip { display: block; font-size: 0.88rem; color: #555; }
.rd-checks .rd-tip[hidden] { display: none; }

/* Expert form */
.rd-expert { margin-top: 1.25rem; background: #fff; border: 1px solid #1d4ed8; border-left-width: 4px; border-radius: 14px; padding: 1.5rem; }
.rd-expert > p { color: #444; margin-bottom: 1rem; }
.rd-expert-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; margin-top: 1.25rem; }
.rd-expert-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.92rem; font-weight: 600; color: #222; min-width: 0; }
.rd-expert-form input, .rd-expert-form select, .rd-expert-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c9d3dc;
  border-radius: 10px;
  background: #fff;
  color: #222;
  width: 100%;
  min-width: 0;
}
.rd-expert-form textarea { min-height: 96px; resize: vertical; }
.rd-expert-form .rd-wide { grid-column: 1 / -1; }
.rd-expert-form .rd-cv-used { font-weight: 400; color: #444; background: #f5f7fa; border-radius: 10px; padding: 0.7rem 0.8rem; }
.rd-expert-form .rd-consent { grid-column: 1 / -1; margin: 0; flex-direction: row; align-items: flex-start; gap: 0.6rem; font-weight: 400; color: #333; }
.rd-expert-form .rd-consent input { width: auto; margin-top: 0.25rem; }
.rd-expert-form .rd-actions { grid-column: 1 / -1; }
.rd-expert-note { font-size: 0.88rem; color: #555; font-weight: 400; }
.rd-expert-status { margin-top: 0.8rem; font-size: 0.95rem; color: #333; }
.rd-expert-status.is-error { color: #b42318; }
.rd-expert-status.is-done { color: #067647; font-weight: 600; }

@media (max-width: 760px) {
  .rd h2 { font-size: 1.6rem; }
  .rd-score-row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .rd-score-text { text-align: left; width: 100%; }
  .rd-subscores { justify-content: center; }
  .rd-expert-form { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .rd-grid { grid-template-columns: 1fr 1fr; }
}
