/* Career Ladder - styles ported verbatim from prototype-v10.html.
   Only addition: a full-page body reset (the prototype was an embedded fragment). */

html, body { margin: 0; padding: 0; background: #F6F7F5; }

#cl11 * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; min-width: 0; }

#cl11-wrap {
  padding: 44px 16px 60px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(180deg, #F6F7F5 0%, #FFFFFF 100%);
}

#cl11 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  width: 100%;
  max-width: 580px;
  color: #18181B;
  user-select: none;
}

.e-spacer { height: 36px; width: 100%; }
.e-spacer-lg { height: 44px; width: 100%; }

.e-section {
  background: #FFFFFF;
  border: 1px solid #E2E5E2;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 6px 20px rgba(0,0,0,0.04);
  width: 100%;
}

/* ============ HEADER ============ */
.e-header { padding: 26px 30px; }
/* ID-scoped so the `#cl11 *` reset can't zero it (else the date touches the edge). */
#cl11 .e-header { padding: 26px 30px; }

.e-header-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.e-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.e-logo {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: #538D4E;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(83,141,78,0.3);
}
.e-logo svg { width: 23px; height: 23px; }

.e-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.e-tagline { font-size: 12px; color: #8E9193; margin-top: 3px; white-space: nowrap; }

.e-num {
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.e-date {
  font-size: 12.5px;
  color: #8E9193;
  text-align: right;
  white-space: nowrap;
}

/* ============ INSTRUCTION CHIP ============ */
.e-howto-row {
  display: flex;
  justify-content: center;
}

.e-howto {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #EDF4EC;
  border: 1px solid #CBDEC8;
  color: #3E6B3A;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(83,141,78,0.1);
}
/* ID-scoped so the `#cl11 *` reset can't zero it (else "4 tries"/"Drag" touch the pill edge). */
#cl11 .e-howto { padding: 14px 26px; }
.e-howto i { font-size: 16px; }
.e-howto b { font-weight: 800; }
.e-howto-sep { color: #A9C2A5; font-weight: 400; margin: 0 5px; }

/* ============ GAME ROW ============ */
.e-game-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.e-axis {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 32px;
  flex-shrink: 0;
  padding: 16px 0;
}
/* TRY: hide the left axis (highest/lowest paid + arrow). Delete this line to bring it back. */
.e-axis { display: none; }

.e-axis-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.e-axis-label.high { color: #538D4E; }
.e-axis-label.low { color: #A1A4A1; }

.e-axis-arrow {
  flex: 1;
  width: 2px;
  background: linear-gradient(180deg, #538D4E 0%, #C9CCC9 100%);
  position: relative;
  min-height: 60px;
}
/* ID-scoped so it beats the `#cl11 *` reset (which zeroes margins). Keeps the arrow
   from touching the HIGHEST/LOWEST PAID labels; extra bottom room for the arrowhead. */
#cl11 .e-axis-arrow { margin: 16px 0 28px; }
.e-axis-arrow::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #C9CCC9;
}

.e-board {
  flex: 1;
  padding: 28px 28px 32px;
}

.e-status {
  /* soft green band header: separates the status from the ranking list, full-bleed to
     the board edges (-28px cancels the board padding). Height + bottom gap preserve the
     original footprint, so the cards below don't move. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 84px;
  padding: 18px 16px;
  margin: -28px -28px 28px;
  background: #EDF4EC;
  border-bottom: 1px solid #CBDEC8;
  border-radius: 18px 18px 0 0;
}

.e-tries {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.e-try-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6E8C6A;
}

.e-try-circle {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #D8DBD8;
  transition: background 0.4s, border-color 0.4s, transform 0.25s;
  flex-shrink: 0;
}
.e-try-circle.current { border-color: #18181B; transform: scale(1.12); }
.e-try-circle.used { background: #E3B341; border-color: #E3B341; }
.e-try-circle.won { background: #538D4E; border-color: #538D4E; }

.e-feedback { font-size: 13px; font-weight: 600; color: #3E6B3A; }
.e-feedback b { color: #538D4E; }

.e-list { display: flex; flex-direction: column; gap: 14px; width: 100%; }
/* Inset the card stack inside the full-width green band: side framing + top gap (below
   the band) + bottom gap (above the board edge). ID-scoped so the #cl11 * reset can't
   zero it; box-sizing:border-box keeps the padding inside the 100% width (no overflow). */
#cl11 .e-list { padding: 16px 18px 20px; }

.e-card {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid #DCDFDC;
  border-radius: 14px;
  display: flex;
  align-items: center;
  cursor: grab;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.2s, transform 0.18s ease;
  position: relative;
  touch-action: none;
  min-height: 60px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.e-card:hover { border-color: #A8ACA8; box-shadow: 0 3px 10px rgba(0,0,0,0.06); }
.e-card:hover .e-grip { color: #538D4E; }

.e-card.dragging {
  border-color: #18181B;
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
  cursor: grabbing;
  z-index: 10;
  transition: none; /* follow the finger with no lag */
}
.e-card.drag-over { border-color: #538D4E; border-style: dashed; background: #FAFCF9; }

.e-card.locked {
  border-color: #4A7F45;
  background: #538D4E;
  cursor: default;
  box-shadow: 0 2px 8px rgba(83,141,78,0.22);
}
.e-card.locked .e-job { color: #fff; }
.e-card.locked .e-grip { color: rgba(255,255,255,0.55); }

.e-card.final-wrong { border-color: #85898D; background: #84888C; }
.e-card.final-wrong .e-job { color: #fff; }
.e-card.final-wrong .e-grip { color: rgba(255,255,255,0.45); }

.e-grip {
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  color: #A2A6A2;
  transition: color 0.15s;
  flex-shrink: 0;
}
.e-grip i { font-size: 16px; }

.e-job {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  padding: 15px 10px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

.e-salary {
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  padding-right: 18px;
  margin-left: auto;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Muted rank badge on the right of an unsolved card (1 = top). Swapped for the
   salary on reveal, so the right slot stays put. */
.e-rank {
  font-size: 13px;
  font-weight: 800;
  color: #BFC3BF;
  width: 24px;
  height: 24px;
  margin-left: auto;
  margin-right: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #E6E8E6;
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
}

@keyframes eFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes eFlip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.e-card.flipping { animation: eFlip 0.5s ease; }

@keyframes eShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
.e-shaking { animation: eShake 0.42s ease; }

/* ============ SUBMIT - THICK ============ */
.e-submit {
  width: 100%;
  padding: 24px;
  background: #18181B;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}
.e-submit:hover { background: #2D2D31; }
.e-submit:active { transform: scale(0.985); }
.e-submit:disabled { background: #D4D6D4; box-shadow: none; cursor: default; }

/* ============ RESULTS ============ */
.e-results { display: none; animation: eFade 0.4s ease forwards; }

.e-res-head { text-align: center; padding: 34px 32px 10px; }
.e-res-title { font-size: 25px; font-weight: 800; letter-spacing: -0.01em; }
.e-res-sub { font-size: 14px; color: #71717A; margin-top: 8px; }

.e-climb-scene { display: flex; justify-content: center; padding: 26px 32px 8px; }
.e-climb-svg { width: 220px; height: auto; }

.e-res-actions { padding: 22px 32px 34px; }

/* Post-game stats row (played / win% / streak / max streak) */
.e-stats { display: flex; justify-content: center; gap: 22px; }
#cl11 .e-stats { padding: 8px 24px 4px; }
.e-stat { text-align: center; }
.e-stat-num { font-size: 23px; font-weight: 800; color: #18181B; font-variant-numeric: tabular-nums; line-height: 1.1; }
.e-stat-lbl { font-size: 11px; color: #8E9193; margin-top: 3px; }
#cl11 .e-stat-lbl { margin-top: 3px; }

.e-share {
  width: 100%;
  padding: 20px;
  background: #538D4E;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 18px rgba(83,141,78,0.3);
}
.e-share:hover { background: #487B44; }
.e-share.copied { background: #18181B; }

.e-countdown { text-align: center; font-size: 13px; color: #71717A; margin-top: 18px; }
.e-countdown b { color: #18181B; font-variant-numeric: tabular-nums; }

.e-source { text-align: center; font-size: 11px; color: #B5B8B5; line-height: 1.6; padding: 0 24px; }
.e-source a { color: #538D4E; text-decoration: none; font-weight: 600; }
.e-source a:hover { text-decoration: underline; }

@keyframes ePop {
  0% { opacity: 0; transform: scale(0.4); }
  70% { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}
.e-pop { animation: ePop 0.55s cubic-bezier(0.34,1.56,0.64,1) both; }
