/* ==========================================================================
   PGPony Playground — /playground
   Extends style.css tokens. Dark terminal aesthetic, mono, 1px borders.
   ========================================================================== */

/* ---- Hero ---------------------------------------------------------------- */
.pg-hero { padding-bottom: 56px; }
.pg-hero-sub { max-width: 680px; margin-top: 18px; }

.pg-netline {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: inline-block;
}

.pg-trust {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pg-trust-item { background: var(--bg); padding: 20px 22px; }
.pg-trust-h {
  font-size: 12px; letter-spacing: 0.04em; text-transform: lowercase;
  color: var(--accent); margin-bottom: 8px;
}
.pg-trust-t { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
@media (max-width: 800px) { .pg-trust { grid-template-columns: 1fr; } }

/* ---- Tabs ---------------------------------------------------------------- */
.pg-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.pg-tab {
  flex: 1 1 auto;
  text-align: center;
  padding: 13px 10px;
  font-size: 13.5px;
  color: var(--text-dim);
  border-right: 1px solid var(--line);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.pg-tab:last-child { border-right: 0; }
.pg-tab:hover { color: var(--text); background: var(--bg-card-hov); }
.pg-tab[aria-selected="true"] {
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
}
.pg-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 680px) {
  .pg-tabs { flex-wrap: wrap; }
  .pg-tab { flex: 1 1 33.33%; border-bottom: 1px solid var(--line); }
}

/* ---- Panels -------------------------------------------------------------- */
.pg-panel { padding: 36px 0 8px; }
.pg-panel-intro { color: var(--text-dim); font-size: 14px; max-width: 720px; margin: 0 0 26px; }

.pg-mode { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.pg-mode label {
  font-size: 13.5px; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.pg-mode input[type="radio"] { accent-color: var(--accent); }
.pg-mode input[type="radio"]:checked + span,
.pg-mode label:has(input:checked) { color: var(--text); }

.pg-field { margin-bottom: 18px; }
.pg-field label {
  display: block; font-size: 12.5px; letter-spacing: 0.03em;
  color: var(--text); margin-bottom: 7px;
}
.pg-field label .dim { color: var(--text-faint); }

.pg-field textarea,
.pg-field input[type="text"],
.pg-field input[type="password"],
.pg-field select {
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 12px;
  resize: vertical;
}
.pg-field textarea::placeholder,
.pg-field input::placeholder { color: var(--text-faint); }
.pg-field textarea:focus,
.pg-field input:focus,
.pg-field select:focus {
  outline: none;
  border-color: var(--line-accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.pg-field input[type="file"] {
  width: 100%; font-family: var(--mono); font-size: 13px; color: var(--text-dim);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 14px 12px; background: var(--bg);
}
.pg-field input[type="file"]::file-selector-button {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--accent); background: transparent;
  border: 1px solid var(--line-accent); border-radius: var(--radius);
  padding: 7px 14px; margin-right: 12px; cursor: pointer;
}

.pg-adv { margin: 4px 0 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.pg-adv summary {
  cursor: pointer; padding: 11px 14px; font-size: 13px; color: var(--text-dim);
  list-style: none;
}
.pg-adv summary::before { content: '+ '; color: var(--accent); }
.pg-adv[open] summary::before { content: '\2212  '; }
.pg-adv summary::-webkit-details-marker { display: none; }
.pg-adv[open] { background: var(--bg-card); }
.pg-adv .pg-field { padding: 0 14px; }
.pg-adv .pg-field:last-child { padding-bottom: 14px; }

/* ---- Buttons ------------------------------------------------------------- */
.pg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.pg-btn {
  font-family: var(--mono); font-size: 13.5px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 22px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pg-btn:hover { color: var(--text); border-color: var(--line-accent); background: var(--bg-card-hov); }
.pg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-btn-primary {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.pg-btn-primary:hover { color: var(--bg); background: #b5ffd7; border-color: #b5ffd7; }
.pg-btn-primary[disabled] { opacity: 0.55; cursor: wait; }
.pg-btn-mini { padding: 5px 12px; font-size: 12px; }

/* ---- Output blocks -------------------------------------------------------- */
.pg-out { margin-top: 22px; }
.pg-out-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 8px;
}
.pg-out-label { font-size: 12px; letter-spacing: 0.04em; color: var(--accent); }
.pg-out-label .dim { color: var(--text-faint); }
.pg-danger-label { color: var(--danger); }
.pg-out-tools { display: flex; gap: 8px; }
.pg-out textarea {
  width: 100%;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  color: var(--text); background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; resize: vertical;
}

/* ---- Verdicts / errors ----------------------------------------------------- */
.pg-verdict {
  margin-top: 20px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--text-dim);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
}
.pg-verdict strong { color: var(--text); }
.pg-verdict-ok     { border-left-color: var(--ok);     color: var(--text); }
.pg-verdict-ok strong { color: var(--ok); }
.pg-verdict-warn   { border-left-color: var(--warn); }
.pg-verdict-warn strong { color: var(--warn); }
.pg-verdict-danger { border-left-color: var(--danger); }
.pg-verdict-danger strong { color: var(--danger); }
.pg-keygen-note { margin: 0 0 26px; }

/* ---- Inspector report ------------------------------------------------------ */
.pg-report {
  margin-top: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.pg-report-row {
  display: grid; grid-template-columns: 170px 1fr;
  border-bottom: 1px solid var(--line);
}
.pg-report-row:last-child { border-bottom: 0; }
.pg-report-k {
  padding: 11px 14px; font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.03em; border-right: 1px solid var(--line);
}
.pg-report-v { padding: 11px 14px; font-size: 13px; color: var(--text); word-break: break-word; }
.pg-report-v .fpr { color: var(--accent); letter-spacing: 0.06em; }
.pg-report-sub { border-top: 1px solid var(--line); background: var(--bg-alt); }
.pg-report-sub .pg-report-k { color: var(--text-faint); }
.pg-badge {
  display: inline-block; font-size: 11px; letter-spacing: 0.05em;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 2px 8px; margin-right: 6px; color: var(--text-dim);
}
.pg-badge-ok { border-color: var(--line-accent); color: var(--ok); }
.pg-badge-danger { border-color: rgba(255,107,107,0.5); color: var(--danger); }
.pg-badge-warn { border-color: rgba(255,181,71,0.5); color: var(--warn); }
@media (max-width: 640px) {
  .pg-report-row { grid-template-columns: 1fr; }
  .pg-report-k { border-right: 0; border-bottom: 1px dashed var(--line); }
}

/* ---- Keygen extras --------------------------------------------------------- */
.pg-gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 680px) { .pg-gen-grid { grid-template-columns: 1fr; } }
.pg-fingerline {
  margin-top: 18px; font-size: 13px; color: var(--text-dim);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 12px 14px;
}
.pg-fingerline .fpr { color: var(--accent); letter-spacing: 0.06em; word-break: break-all; }

/* ---- Funnel ---------------------------------------------------------------- */
.pg-funnel {
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.pg-funnel-text { font-size: 13px; color: var(--text-dim); max-width: 560px; line-height: 1.65; }
.pg-funnel-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pg-funnel-links a {
  font-size: 12.5px; white-space: nowrap; color: var(--accent);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 9px 16px;
}
.pg-funnel-links a:hover { border-color: var(--line-accent); background: var(--bg-card-hov); }

/* ---- Verify-us section ------------------------------------------------------ */
.pg-check-p { color: var(--text-dim); font-size: 14px; max-width: 720px; }
.pg-hash { font-size: 11.5px; word-break: break-all; }

/* ---- Busy state -------------------------------------------------------------- */
.pg-busy::after {
  content: '';
  display: inline-block; width: 10px; height: 10px; margin-left: 10px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%;
  animation: pg-spin 0.7s linear infinite;
  vertical-align: -1px;
}
@keyframes pg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .pg-busy::after { animation: none; opacity: 0.5; }
}
