/* ═══════════════════════════════════════════
   Code Minifier — Styles (PG Golden Reference)
   ═══════════════════════════════════════════ */

/* Page Header */
.cm-page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}
.cm-ph-left {
  padding: 44px 48px 36px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cm-ph-left::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
}
.cm-ph-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ey-dot {
  width: 6px;
  height: 6px;
  background: var(--green, #00c875);
  border-radius: 50%;
  animation: cm-dot-blink 1.8s step-end infinite;
}
@keyframes cm-dot-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.ey-sep {
  color: var(--border);
}
.cm-ph-title {
  font-family: var(--cond);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}
.cm-ph-title .t-accent {
  color: var(--yellow);
}
.cm-ph-desc {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.65;
  border-left: 3px solid var(--yellow);
  padding-left: 14px;
  margin-bottom: 28px;
}
.cm-ph-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cm-ph-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.cm-ph-tag.yellow {
  border-color: var(--yellow);
  color: var(--yellow);
}
.cm-ph-tag.green {
  border-color: var(--green, #00c875);
  color: var(--green, #00c875);
}

.cm-ph-right {
  display: flex;
  flex-direction: column;
  min-width: 220px;
}
.cm-ph-stat {
  flex: 1;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cm-ph-stat:last-child {
  border-bottom: none;
}
.cm-ph-stat-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cm-ph-stat-val {
  font-family: var(--cond);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
}
.cm-ph-stat-val .y {
  color: var(--yellow);
}
.cm-ph-stat-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Main Layout */
.cm-page-body {
  display: block;
}

.cm-editor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) {
  .cm-editor-container {
    grid-template-columns: 1fr;
  }
}

.cm-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-height: 480px;
}
.cm-panel:last-child {
  border-right: none;
}

.cm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
  height: 46px;
  padding: 0 20px;
}
.cm-panel-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cm-panel-actions {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.cm-select {
  height: 46px;
  padding: 0 12px;
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  cursor: pointer;
  outline: none;
}
.cm-btn {
  height: 46px;
  padding: 0 16px;
  border: none;
  border-left: 1px solid var(--border);
  background: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.12s,
    background 0.12s;
}
.cm-btn:hover {
  color: var(--white);
  background: #111;
}
.cm-btn.primary {
  background: var(--yellow);
  color: var(--ink, #0c0c0c);
  font-weight: 800;
}
.cm-btn.primary:hover {
  background: #d4e600;
}

.cm-textarea {
  flex: 1;
  width: 100%;
  background: #050505;
  border: none;
  color: var(--white);
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.92rem;
  resize: none;
  line-height: 1.6;
  outline: none;
}
.cm-textarea[readonly] {
  color: var(--muted);
}

/* Stats box */
.cm-stats-box {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}
.cm-stat-item {
  flex: 1;
  padding: 14px 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cm-stat-item:last-child {
  border-right: none;
}
.cm-stat-lbl {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cm-stat-val {
  font-family: var(--cond);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--white);
}
.cm-stat-val.good {
  color: var(--green, #00c875);
}

/* Docs layout */
.cm-docs-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
}
@media (max-width: 900px) {
  .cm-docs-layout {
    grid-template-columns: 1fr;
  }
}

.cm-docs-layout > main {
  border-right: 1px solid var(--border);
}
.cm-docs-layout > aside {
  display: flex;
  flex-direction: column;
  background: #080808;
}

/* Content Section (docs) */
.rt-content-section {
  border-bottom: 1px solid var(--border);
}
.rt-cs-header {
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 46px;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}
.rt-cs-header-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rt-cs-header-title {
  font-family: var(--cond);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-left: 16px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
.rt-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.rt-step:hover {
  background: #0d0d0d;
}
.rt-step:last-child {
  border-bottom: none;
}
.rt-step-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 0 20px;
  border-right: 1px solid var(--border);
  font-family: var(--cond);
  font-size: 2rem;
  font-weight: 900;
  color: var(--border);
  letter-spacing: -0.04em;
  transition: color 0.15s;
}
.rt-step:hover .rt-step-num {
  color: var(--yellow);
}
.rt-step-content {
  padding: 20px 24px;
}
.rt-step-title {
  font-family: var(--cond);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 6px;
}
.rt-step-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .cm-page-header {
    grid-template-columns: 1fr;
  }
  .cm-ph-left {
    border-right: none;
  }
  .cm-ph-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border);
  }
  .cm-ph-stat {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .cm-ph-stat:last-child {
    border-right: none;
  }
}

/* Docs — Reference Guide */
.cm-content-section {
  border-bottom: 1px solid var(--border);
}
.cm-cs-header {
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 46px;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}
.cm-cs-header-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cm-cs-header-title {
  font-family: var(--cond);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-left: 16px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
.cm-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.cm-step:hover {
  background: #0d0d0d;
}
.cm-step:last-child {
  border-bottom: none;
}
.cm-step-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 0 20px;
  border-right: 1px solid var(--border);
  font-family: var(--cond);
  font-size: 2rem;
  font-weight: 900;
  color: var(--border);
  letter-spacing: -0.04em;
  transition: color 0.15s;
}
.cm-step:hover .cm-step-num {
  color: var(--yellow);
}
.cm-step-content {
  padding: 20px 24px;
}
.cm-step-title {
  font-family: var(--cond);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 6px;
}
.cm-step-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}
