.page-class-upskill {
  --upskill-purple: #5a0a87;
  --upskill-green: #1e7d36;
  --upskill-red: #bd2626;
  --upskill-blue: #173b67;
  --upskill-bg: #f7f3fb;
  --upskill-border: #d8c7e4;
  --upskill-shadow: 0 10px 28px rgba(23, 59, 103, 0.08);
  --upskill-header-right-inset: 0px;
}

.page-class-upskill .pv-section {
  max-width: 1120px;
  margin: 98px auto 36px;
  padding: 20px;
  transform: none;
  position: relative;
}

.page-class-upskill #pv-local-menu,
.page-class-upskill .pv-local-menu {
  position: absolute;
  top: 66px;
  left: 20px;
  margin: 0;
  width: auto;
  transform: translateY(-100%);
}

.page-class-upskill #pv-local-menu .pv-menu-title,
.page-class-upskill #pv-local-menu .pv-menu-nav {
  width: max-content;
  min-width: 100%;
}

.page-class-upskill .pv-header-section {
  margin: 0 0 24px;
  text-align: right;
}

.page-class-upskill .pv-header-title {
  font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.05;
}

.page-class-upskill .pv-header-subtitle {
  font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.05;
  margin: 4px 0 0;
}

.page-class-upskill .pv-header-divider {
  margin: 0 0 18px;
  transform: translateY(-38px);
}

.page-class-upskill .upskill-main-content {
  gap: 18px;
  align-items: stretch;
}

.page-class-upskill .upskill-leftbox {
  flex: 0 0 25%;
  max-width: 25%;
  min-width: 0;
  padding: 18px;
  background: linear-gradient(180deg, #faf7fd 0%, #f3ebf8 100%);
  border: 1px solid var(--upskill-border);
  box-shadow: var(--upskill-shadow);
}

.page-class-upskill .upskill-rightbox {
  flex: 0 0 75%;
  max-width: 75%;
  min-width: 0;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--upskill-border);
  box-shadow: var(--upskill-shadow);
}

.upskill-left-header h2,
.upskill-topbar-copy h2,
.upskill-result-panel h3,
.upskill-bottom-box h2 {
  margin: 0;
  color: var(--upskill-purple);
}

.upskill-topbar-copy h2 {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.75rem);
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upskill-left-header p,
.upskill-topbar-copy p,
.upskill-note-card p,
.upskill-bottom-box p {
  color: #3d3d3d;
}

.upskill-left-header p {
  margin: 10px 0 16px;
  font-size: 0.96rem;
}

.upskill-subject-tree {
  display: grid;
  gap: 14px;
}

.upskill-subject-nav {
  display: grid;
  gap: 12px;
}

.upskill-subject-panel {
  border: 1px solid #cdb5de;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(23, 59, 103, 0.06);
}

.upskill-subject-panel-title {
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, var(--upskill-purple) 0%, #7a22a8 100%);
}

.upskill-subject-toggle {
  width: 100%;
  border: 1px solid #cdb5de;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  color: var(--upskill-blue);
  background: linear-gradient(90deg, #f8f4fc 0%, #f0e7f8 100%);
}

.upskill-subject-toggle.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--upskill-purple) 0%, #7a22a8 100%);
  border-color: #7a22a8;
}

.upskill-chapter-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.upskill-chapter-group {
  display: grid;
  gap: 6px;
}

.upskill-chapter-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6a5b77;
  padding: 2px 2px 0;
}

.upskill-chapter-button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d3c0e0;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  background: #ffffff;
  color: #333333;
}

.upskill-chapter-button.is-case-study {
  margin-left: 12px;
  width: calc(100% - 12px);
  background: #fcf9ff;
}

.upskill-chapter-button:hover,
.upskill-chapter-button.is-selected {
  border-color: var(--upskill-purple);
  background: #f7f0fc;
}

.upskill-chapter-button.is-selected {
  box-shadow: inset 0 0 0 1px var(--upskill-purple);
}

.upskill-chapter-button[disabled] {
  cursor: not-allowed;
  opacity: 0.7;
}

.upskill-chapter-button small {
  display: block;
  margin-top: 4px;
  color: #6a5b77;
}

.upskill-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

.upskill-topbar-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.upskill-user-box {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.upskill-control-grid {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: flex-start;
  flex: 0 1 420px;
  min-width: 0;
  max-width: 100%;
}

.upskill-control-grid .upskill-user-box {
  flex: 1 1 0;
  min-width: 0;
}

.upskill-control-grid .upskill-user-box:first-child {
  flex: 1.15 1 0;
}

.upskill-control-grid .upskill-user-box:last-child {
  flex: 0.85 1 0;
}

.upskill-user-box label,
.meta-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--upskill-blue);
}

.upskill-input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #baa0ce;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

.upskill-timer-display {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid #baa0ce;
  border-radius: 10px;
  background: #faf7fd;
  color: var(--upskill-purple);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.upskill-floating-timer-shell {
  position: fixed;
  right: 18px;
  bottom: 132px;
  z-index: 2600;
  width: 112px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #d7c4e7;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 26px rgba(23, 59, 103, 0.14);
}

.upskill-floating-unselect {
  position: fixed;
  right: 18px;
  bottom: 276px;
  z-index: 2600;
  width: 112px;
  min-height: 40px;
  border: 1px solid #d7c4e7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--upskill-purple);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 59, 103, 0.14);
}

.upskill-floating-unselect[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.upskill-floating-print {
  position: fixed;
  right: 18px;
  bottom: 228px;
  z-index: 2600;
  width: 112px;
  min-height: 40px;
  border: 1px solid #d7c4e7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--upskill-blue);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 59, 103, 0.14);
}

.upskill-floating-timer-label {
  margin-bottom: 5px;
  color: var(--upskill-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

.upskill-floating-submit {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 2600;
  width: 112px;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--upskill-purple);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 59, 103, 0.14);
}

.upskill-floating-submit[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.upskill-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.upskill-note-card {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e1d5eb;
  background: var(--upskill-bg);
}

.upskill-note-card h3 {
  margin: 0 0 2px;
  color: var(--upskill-blue);
  font-size: 0.82rem;
  line-height: 1.1;
}

.upskill-note-card p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.1;
}

.upskill-status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
}

.upskill-status-info {
  background: #eef5ff;
  color: var(--upskill-blue);
  border: 1px solid #c7dbf5;
}

.upskill-status-success {
  background: #edf9ef;
  color: var(--upskill-green);
  border: 1px solid #cbe8d2;
}

.upskill-status-error {
  background: #fff1f1;
  color: var(--upskill-red);
  border: 1px solid #f0c8c8;
}

.upskill-chapter-meta {
  display: grid;
  grid-template-columns: 0.8fr 1.8fr 0.5fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fcfaff;
  border: 1px solid #e5d8ef;
}

.upskill-chapter-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--upskill-purple);
  font-size: 0.82rem;
  line-height: 1.18;
}

#metaChapter {
  font-size: 0.8rem;
  line-height: 1.16;
}

.upskill-questions-host {
  display: grid;
  gap: 16px;
}

.upskill-question-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #e2d5ed;
  background: linear-gradient(180deg, #ffffff 0%, #fbf8fe 100%);
}

.upskill-question-card p {
  font-size: 0.72rem;
  line-height: 1.05;
  margin: 0 0 4px;
  color: #645671;
}

.upskill-question-card h3 {
  margin: 0 0 9px;
  color: #232323;
  font-size: 0.96rem;
  line-height: 1.28;
  font-weight: 400;
}

.upskill-options {
  display: grid;
  gap: 6px;
}

.upskill-option {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 7px 9px;
  border: 1px solid #e1d8e8;
  border-radius: 10px;
  background: #ffffff;
}

.upskill-option input {
  margin-top: 2px;
}

.upskill-option span {
  font-size: 0.84rem;
  line-height: 1.22;
}

.upskill-option-key {
  font-weight: 500;
  color: var(--upskill-blue);
}

.upskill-question-review {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e0d5ea;
  font-size: 0.83rem;
  line-height: 1.3;
}

.upskill-question-review.is-correct {
  color: var(--upskill-green);
  font-weight: 700;
}

.upskill-question-review.is-wrong {
  color: var(--upskill-red);
  font-weight: 400;
}

.upskill-question-review-line {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  align-items: start;
}

.upskill-question-review-line + .upskill-question-review-line {
  margin-top: 3px;
}

.upskill-question-review-label {
  white-space: nowrap;
}

.upskill-question-review-value {
  min-width: 0;
}

.upskill-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.upskill-actions .upskill-button {
  min-width: 148px;
}

.upskill-button {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.upskill-button.primary {
  background: var(--upskill-purple);
  color: #ffffff;
}

.upskill-button.secondary {
  background: #e8eef7;
  color: var(--upskill-blue);
}

.upskill-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.upskill-result-panel {
  margin-top: 22px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #d5c5e5;
  background: linear-gradient(180deg, #fffdfd 0%, #f8f3fc 100%);
}

.upskill-result-summary,
.upskill-comparison,
.upskill-wrong-answers {
  margin-top: 12px;
}

.upskill-result-summary p,
.upskill-comparison p,
.upskill-wrong-answers p {
  margin: 6px 0;
}

.upskill-case-study-block {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fbf8fe;
  border: 1px solid #e3d8ef;
}

.upskill-case-study-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--upskill-blue);
  margin-bottom: 6px;
}

.upskill-case-study-block p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #353535;
}

.upskill-medium-card {
  border-color: #ddd0ef;
  background: linear-gradient(180deg, #fffefe 0%, #fbf8ff 100%);
}

.upskill-medium-case-study-block {
  background: #f8f2ff;
  border-left: 4px solid #8420c7;
}

.upskill-medium-question-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #d8c3ed;
}

.upskill-medium-question-block h3 {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(132, 32, 199, 0.08);
  color: #8420c7;
  font-size: 0.86rem;
  line-height: 1.34;
  font-weight: 400;
}

.upskill-medium-question-block .upskill-options {
  gap: 10px;
}

.upskill-history-card {
  padding: 14px;
  border: 1px solid #d9cae8;
  border-radius: 12px;
  background: #fffefe;
}

.upskill-history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
  color: var(--upskill-blue);
}

.upskill-history-head span {
  font-size: 0.8rem;
  color: #6a5b77;
}

.upskill-history-chart-wrap {
  overflow-x: auto;
}

.upskill-history-chart {
  display: block;
  width: 100%;
  min-width: 300px;
  height: auto;
}

.upskill-history-axis {
  stroke: #9382a5;
  stroke-width: 1.4;
}

.upskill-history-grid {
  stroke: #e7deef;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.upskill-history-line {
  fill: none;
  stroke: #8e44ad;
  stroke-width: 2.2;
}

.upskill-history-bar {
  fill: rgba(142, 68, 173, 0.14);
}

.upskill-history-bar.is-current {
  fill: rgba(30, 125, 54, 0.2);
}

.upskill-history-dot {
  fill: #8e44ad;
}

.upskill-history-dot.is-current {
  fill: #1e7d36;
}

.upskill-history-axis-label {
  fill: #6a5b77;
  font-size: 10px;
}

.upskill-history-summary {
  margin-top: 10px;
}

.page-class-upskill .back-to-top {
  right: 18px;
  bottom: 20px;
  z-index: 1001;
}

.upskill-wrong-answer-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8f8;
  border: 1px solid #efd0d0;
}

.upskill-empty-state {
  padding: 22px;
  border-radius: 14px;
  text-align: center;
  border: 1px dashed #ceb6e0;
  background: #fcf9ff;
}

.upskill-empty-state h3 {
  margin: 0 0 8px;
  color: var(--upskill-purple);
}

.upskill-bottom-box {
  padding: 16px 20px;
  text-align: center;
}

.upskill-topbar-copy h2 {
  font-size: 1.15rem;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upskill-topbar-copy p {
  font-size: 0.82rem;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 0;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .page-class-upskill .upskill-topbar,
  .page-class-upskill .upskill-main-content {
    flex-direction: column;
  }

  .page-class-upskill .upskill-leftbox,
  .page-class-upskill .upskill-rightbox {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .upskill-note-grid,
  .upskill-chapter-meta {
    grid-template-columns: 1fr;
  }

  .upskill-user-box {
    width: 100%;
    min-width: 0;
  }

  .upskill-control-grid {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .upskill-floating-timer-shell {
    right: 12px;
    bottom: 140px;
    width: 102px;
  }

  .upskill-floating-print {
    right: 12px;
    bottom: 256px;
    width: 102px;
  }

  .upskill-floating-unselect {
    right: 12px;
    bottom: 304px;
    width: 102px;
  }

  .upskill-floating-submit {
    right: 12px;
    bottom: 100px;
    width: 102px;
  }

  .page-class-upskill .back-to-top {
    right: 12px;
    bottom: 24px;
  }
}

@media print {
  body.page-class-upskill {
    background: #ffffff;
  }

  .page-class-upskill #passwordOverlay,
  .page-class-upskill #site-header,
  .page-class-upskill #header-menu,
  .page-class-upskill #pv-local-menu,
  .page-class-upskill .pv-header-section,
  .page-class-upskill .upskill-leftbox,
  .page-class-upskill .upskill-topbar,
  .page-class-upskill .upskill-note-grid,
  .page-class-upskill #chapterStatus,
  .page-class-upskill .upskill-actions,
  .page-class-upskill .pv-bottombox,
  .page-class-upskill #site-footer,
  .page-class-upskill .upskill-floating-unselect,
  .page-class-upskill .upskill-floating-print,
  .page-class-upskill .upskill-floating-timer-shell,
  .page-class-upskill .upskill-floating-submit,
  .page-class-upskill .back-to-top {
    display: none !important;
  }
}

@media (min-width: 901px) {
  .page-class-upskill {
    --upskill-header-right-inset: max(24px, calc((min(100vw, 1200px) - min(100vw, 960px)) / 2));
  }

  .page-class-upskill .pv-header-section {
    margin-right: var(--upskill-header-right-inset);
  }
}
