.pt-main {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--color-bg) 0%, #eaf3ef 100%);
}

.pt-hero {
  padding: 2.2rem 0 1.2rem;
}

.pt-badge {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pt-hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
}

.pt-hero p {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 700px;
}

.pt-section {
  padding: 0.8rem 0 3.2rem;
}

.pt-form {
  background: var(--color-surface);
  border: 1px solid rgba(26, 46, 40, 0.08);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow-md);
}

.pt-info {
  margin: 0 0 0.95rem;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

.pt-live {
  margin: 0 0 1rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(26, 46, 40, 0.08);
  border-radius: 12px;
  background: rgba(13, 143, 110, 0.04);
}

.pt-live-item {
  margin: 0;
  display: inline-block;
  margin-right: 0.9rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.pt-live-item strong {
  color: var(--color-text);
}

.pt-progress {
  margin-top: 0.55rem;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(26, 46, 40, 0.1);
  overflow: hidden;
}

.pt-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), #20b18a);
  transition: width 220ms ease;
}

.pt-question {
  margin: 0 0 0.95rem;
  border: 1px solid rgba(26, 46, 40, 0.1);
  border-radius: 16px;
  padding: 0.95rem;
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 248, 0.98));
  box-shadow: 0 8px 20px rgba(24, 46, 38, 0.05);
}

.pt-question-legend {
  width: 100%;
  margin: 0 0 0.68rem;
  padding: 0;
  display: grid;
  gap: 0.32rem;
  padding-right: 3.5rem;
}

.pt-question-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  background: rgba(13, 143, 110, 0.14);
  color: var(--color-accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pt-question-text {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
}

.pt-question label {
  display: block;
  margin-top: 0.45rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.pt-option {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  padding: 0.62rem 0.66rem;
  border: 1px solid rgba(26, 46, 40, 0.11);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.pt-option:hover {
  border-color: rgba(13, 143, 110, 0.35);
  box-shadow: 0 4px 10px rgba(13, 143, 110, 0.12);
}

.pt-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pt-option-key {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 46, 40, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.pt-option-text {
  color: var(--color-text);
  line-height: 1.45;
}

.pt-option.is-selected {
  border-color: rgba(13, 143, 110, 0.5);
  background: linear-gradient(135deg, rgba(13, 143, 110, 0.14), rgba(13, 143, 110, 0.07));
  box-shadow: 0 6px 14px rgba(13, 143, 110, 0.14);
}

.pt-option.is-selected .pt-option-key {
  border-color: transparent;
  background: var(--color-accent);
  color: #fff;
}

.pt-option--correct {
  border-color: rgba(23, 166, 97, 0.62) !important;
  background: linear-gradient(135deg, rgba(22, 164, 96, 0.18), rgba(22, 164, 96, 0.1)) !important;
  box-shadow: 0 6px 14px rgba(22, 164, 96, 0.16) !important;
}

.pt-option--correct .pt-option-key {
  border-color: transparent;
  background: #13a45f;
  color: #fff;
}

.pt-option--wrong {
  border-color: rgba(216, 72, 72, 0.58) !important;
  background: linear-gradient(135deg, rgba(216, 72, 72, 0.14), rgba(216, 72, 72, 0.08)) !important;
  box-shadow: 0 6px 14px rgba(216, 72, 72, 0.14) !important;
}

.pt-option--wrong .pt-option-key {
  border-color: transparent;
  background: #d84848;
  color: #fff;
}

.pt-question.is-focus {
  box-shadow: 0 0 0 2px rgba(13, 143, 110, 0.3);
}

.pt-question input {
  margin-right: 0.45rem;
}

.pt-level-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
}

.pt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.pt-actions .btn {
  min-height: 44px;
}

.pt-error {
  margin: 0.9rem 0 0;
  color: #c81e1e;
  font-size: 0.9rem;
}

.pt-result {
  margin-top: 1.1rem;
  background: var(--color-surface);
  border: 1px solid rgba(26, 46, 40, 0.08);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow-md);
}

.pt-result h2 {
  margin: 0 0 0.45rem;
  line-height: 1.3;
}

.pt-result p {
  margin: 0;
  color: var(--color-text-muted);
}

.pt-score {
  margin: 0 0 0.45rem !important;
  font-weight: 600;
  color: var(--color-text) !important;
}

.pt-band {
  margin-top: 0.15rem !important;
  font-size: 0.88rem;
  color: var(--color-accent-dark) !important;
}

.pt-metrics {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.pt-metric {
  border: 1px solid rgba(26, 46, 40, 0.09);
  background: rgba(13, 143, 110, 0.04);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
}

.pt-metric-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted) !important;
}

.pt-metric-value {
  margin: 0.25rem 0 0 !important;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text) !important;
}

.pt-verdict {
  margin-top: 0.2rem !important;
  color: var(--color-text) !important;
  line-height: 1.65;
}

.pt-insights {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.pt-insight-card {
  border: 1px solid rgba(26, 46, 40, 0.09);
  background: rgba(13, 143, 110, 0.04);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
}

.pt-insight-card h3 {
  margin: 0 0 0.32rem;
  font-size: 0.84rem;
}

.pt-mini-list {
  margin: 0;
  padding-left: 0.95rem;
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.pt-mini-list li {
  margin-bottom: 0.2rem;
}

.pt-breakdown {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.pt-breakdown-row {
  display: grid;
  grid-template-columns: 40px 52px 1fr;
  gap: 0.55rem;
  align-items: center;
}

.pt-breakdown-level {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}

.pt-breakdown-score {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.pt-breakdown-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(26, 46, 40, 0.11);
  overflow: hidden;
}

.pt-breakdown-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), #20b18a);
}

.pt-plan {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
  color: var(--color-text-muted);
}

.pt-plan li {
  margin-bottom: 0.3rem;
}

.pt-confidence {
  margin: 0.75rem 0 0 !important;
  font-size: 0.86rem;
  color: var(--color-text-muted) !important;
}

.pt-modules-wrap {
  margin-top: 0.9rem;
}

.pt-modules-title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
}

.pt-modules {
  margin: 0;
  padding-left: 1rem;
}

.pt-modules li {
  margin-bottom: 0.28rem;
}

.pt-modules li.is-rtl {
  direction: rtl;
  text-align: right;
}

.pt-modules li.is-rtl a,
.pt-modules li.is-rtl .pt-modules-note {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

.pt-modules a {
  color: var(--color-accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.pt-modules a:hover {
  text-decoration: underline;
}

.pt-modules-note {
  color: var(--color-text-muted);
  font-weight: 500;
}

:root[data-theme="dark"] .pt-main {
  background: linear-gradient(180deg, #111a17 0%, #16221e 100%);
}

:root[data-theme="dark"] .pt-live {
  background: rgba(20, 45, 39, 0.82);
  border-color: rgba(82, 201, 164, 0.26);
}

:root[data-theme="dark"] .pt-live-item,
:root[data-theme="dark"] .pt-breakdown-score,
:root[data-theme="dark"] .pt-plan {
  color: #c5d7ce;
}

:root[data-theme="dark"] .pt-live-item strong,
:root[data-theme="dark"] .pt-option-text {
  color: #e6f2ec;
}

:root[data-theme="dark"] .pt-progress,
:root[data-theme="dark"] .pt-breakdown-track {
  background: rgba(181, 206, 195, 0.15);
}

:root[data-theme="dark"] .pt-option {
  background: #13241f;
  border-color: rgba(83, 201, 164, 0.28);
}

:root[data-theme="dark"] .pt-option:hover {
  border-color: rgba(83, 201, 164, 0.42);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .pt-option.is-selected {
  background: linear-gradient(135deg, rgba(35, 103, 82, 0.58), rgba(20, 58, 47, 0.56));
  border-color: rgba(83, 201, 164, 0.56);
}

:root[data-theme="dark"] .pt-option--correct {
  border-color: rgba(46, 197, 125, 0.65) !important;
  background: linear-gradient(135deg, rgba(33, 130, 92, 0.58), rgba(21, 77, 56, 0.56)) !important;
}

:root[data-theme="dark"] .pt-option--wrong {
  border-color: rgba(236, 98, 98, 0.64) !important;
  background: linear-gradient(135deg, rgba(126, 47, 47, 0.54), rgba(84, 34, 34, 0.5)) !important;
}

:root[data-theme="dark"] .pt-question {
  background: linear-gradient(160deg, rgba(17, 33, 28, 0.98), rgba(20, 37, 31, 0.98));
  border-color: rgba(83, 201, 164, 0.2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .pt-question-no {
  background: rgba(83, 201, 164, 0.2);
  color: #9cf3d5;
}

:root[data-theme="dark"] .pt-question-text {
  color: #e6f2ec;
}

:root[data-theme="dark"] .pt-breakdown-level {
  color: #7ae2c1;
}

:root[data-theme="dark"] .pt-band {
  color: #7ae2c1 !important;
}

:root[data-theme="dark"] .pt-verdict {
  color: #e6f2ec !important;
}

:root[data-theme="dark"] .pt-insight-card {
  background: rgba(26, 78, 63, 0.35);
  border-color: rgba(83, 201, 164, 0.28);
}

:root[data-theme="dark"] .pt-mini-list,
:root[data-theme="dark"] .pt-confidence {
  color: #c5d7ce !important;
}

:root[data-theme="dark"] .pt-metric {
  background: rgba(26, 78, 63, 0.35);
  border-color: rgba(83, 201, 164, 0.28);
}

:root[data-theme="dark"] .pt-metric-label {
  color: #c5d7ce !important;
}

:root[data-theme="dark"] .pt-metric-value,
:root[data-theme="dark"] .pt-modules-title,
:root[data-theme="dark"] .pt-modules a {
  color: #e6f2ec !important;
}

:root[data-theme="dark"] .pt-modules-note {
  color: #c5d7ce !important;
}

@media (max-width: 720px) {
  .pt-badge {
    font-size: 0.58rem !important;
    padding: 0.12rem 0.4rem !important;
    letter-spacing: 0.01em !important;
    line-height: 1.1;
  }

  .pt-hero {
    padding: 1.55rem 0 0.9rem;
  }

  .pt-hero h1 {
    font-size: 1.45rem;
    line-height: 1.25;
  }

  .pt-hero p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .pt-form,
  .pt-result {
    padding: 0.78rem;
    border-radius: 12px;
  }

  .pt-question {
    margin-bottom: 0.75rem;
    padding: 0.72rem;
    border-radius: 12px;
  }

  .pt-question-legend {
    margin-bottom: 0.52rem;
    gap: 0.24rem;
    padding-right: 2.6rem;
  }

  .pt-question-no {
    font-size: 0.63rem;
    padding: 0.08rem 0.42rem;
  }

  .pt-question-text {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .pt-level-badge {
    top: 0.5rem;
    right: 0.55rem;
    font-size: 0.61rem;
    padding: 0.1rem 0.34rem;
  }

  .pt-actions {
    flex-direction: column;
    gap: 0.45rem;
  }

  .pt-actions .btn {
    width: 100%;
    min-height: 40px;
    padding: 0.62rem 0.95rem;
    font-size: 0.88rem;
    justify-content: center;
  }

  .pt-result h2 {
    font-size: 1.28rem;
  }

  .pt-score {
    font-size: 0.95rem;
  }

  .pt-insights {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .pt-metrics {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .pt-live {
    padding: 0.62rem 0.66rem;
  }

  .pt-live-item {
    font-size: 0.8rem;
    margin-right: 0.45rem;
  }

  .pt-progress {
    margin-top: 0.4rem;
    height: 6px;
  }

  .pt-option {
    padding: 0.44rem 0.48rem;
    gap: 0.4rem;
    border-radius: 10px;
  }

  .pt-option-key {
    width: 1.16rem;
    height: 1.16rem;
    font-size: 0.66rem;
  }

  .pt-option-text {
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .pt-metric {
    padding: 0.5rem 0.56rem;
    border-radius: 10px;
  }

  .pt-metric-label {
    font-size: 0.68rem;
  }

  .pt-metric-value {
    font-size: 0.83rem;
  }

  .pt-insight-card {
    padding: 0.52rem 0.58rem;
    border-radius: 10px;
  }

  .pt-insight-card h3 {
    font-size: 0.76rem;
  }

  .pt-mini-list {
    font-size: 0.8rem;
    padding-left: 0.8rem;
  }

  .pt-breakdown-row {
    grid-template-columns: 30px 42px 1fr;
    gap: 0.45rem;
  }

  .pt-breakdown-level,
  .pt-breakdown-score {
    font-size: 0.74rem;
  }

  .pt-breakdown-track {
    height: 6px;
  }

  .pt-plan {
    margin-top: 0.6rem;
    padding-left: 0.86rem;
    font-size: 0.84rem;
  }

  .pt-confidence {
    margin-top: 0.55rem !important;
    font-size: 0.8rem;
  }

  .pt-modules-title {
    font-size: 0.82rem;
  }

  .pt-modules {
    padding-left: 0.86rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 420px) {
  .pt-badge {
    font-size: 0.54rem !important;
    padding: 0.1rem 0.36rem !important;
  }

  .pt-hero h1 {
    font-size: 1.16rem;
  }

  .pt-hero p {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .pt-info {
    font-size: 0.83rem;
  }

  .pt-form,
  .pt-result {
    padding: 0.68rem;
    border-radius: 10px;
  }

  .pt-question {
    padding: 0.62rem;
    border-radius: 10px;
  }

  .pt-question-legend {
    gap: 0.2rem;
    padding-right: 2.2rem;
  }

  .pt-question-no {
    font-size: 0.58rem;
  }

  .pt-question-text {
    font-size: 0.84rem;
  }

  .pt-level-badge {
    font-size: 0.56rem;
    padding: 0.08rem 0.3rem;
  }

  .pt-live-item {
    display: block;
    margin-right: 0;
    margin-bottom: 0.16rem;
    font-size: 0.78rem;
  }

  .pt-option {
    padding: 0.38rem 0.42rem;
    gap: 0.34rem;
  }

  .pt-option-key {
    width: 1.02rem;
    height: 1.02rem;
    font-size: 0.58rem;
  }

  .pt-option-text {
    font-size: 0.8rem;
  }

  .pt-actions .btn {
    min-height: 38px;
    font-size: 0.84rem;
  }

  .pt-breakdown-row {
    grid-template-columns: 26px 38px 1fr;
    gap: 0.36rem;
  }

  .pt-breakdown-level,
  .pt-breakdown-score {
    font-size: 0.68rem;
  }

}

@media print {
  .site-header,
  .pt-hero,
  .pt-form,
  .site-footer,
  .theme-fab {
    display: none !important;
  }

  .pt-main {
    background: #fff !important;
  }

  .pt-section {
    padding: 0 !important;
  }

  #pt-result {
    margin-top: 0 !important;
    border: 1px solid #bbb !important;
    box-shadow: none !important;
  }
}
