/* ---------------------------------------------------------------------
   gate.css — KaspaSphere network panel
   Additive only. Does not modify any existing selector in style.css.
   --------------------------------------------------------------------- */

:root {
  --ks-kaspa: #70c7ba;
  --ks-dot: #e6007a;
  --ks-dim: #9aa0a6;
  --ks-line: #3a3e44;
}

/* ---------------- Panel shell ---------------- */
.ks-panel {
  width: 100%;
  max-width: 620px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 20px;
  padding: 18px;
}

.ks-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.ks-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.ks-chain {
  font-size: 0.7rem;
  color: var(--ks-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ks-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
}
.ks-dot.is-live { background: var(--accent); }
.ks-dot.is-warn { background: #d8a13a; }
.ks-dot.is-off  { background: #6b6f76; }

.ks-intro {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #c3c7cc;
  margin: 8px 0 16px;
}

/* ---------------- Tier cards ---------------- */
.ks-tiers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ks-tier {
  border: 2px solid var(--ks-line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #24272b;
  position: relative;
}

.ks-tier-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ks-tier-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--outline);
  background: var(--peach);
  color: var(--outline);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ks-tier h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.ks-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  margin-left: auto;
  white-space: nowrap;
}
.ks-badge.is-live { color: var(--accent); }
.ks-badge.is-dev  { color: var(--ks-dim); }

.ks-tier p {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #b9bec4;
  margin: 8px 0 0;
}

.ks-tier .ks-meta {
  font-size: 0.7rem;
  color: var(--ks-dim);
  margin-top: 8px;
  word-break: break-word;
}
.ks-tier .ks-meta code {
  color: #cfd3d8;
  font-size: 0.68rem;
}

.ks-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ks-status {
  font-size: 0.75rem;
  line-height: 1.45;
  min-height: 1.2em;
  margin-top: 10px;
  color: var(--accent);
  word-break: break-word;
}
.ks-status.is-error { color: #e8837a; }
.ks-status.is-muted { color: var(--ks-dim); }
.ks-status a { color: inherit; }

/* Accent rails so the three tiers read as a progression */
.ks-tier--play      { border-left: 4px solid var(--accent); }
.ks-tier--tournament{ border-left: 4px solid var(--ks-kaspa); }
.ks-tier--prizes    { border-left: 4px solid var(--ks-dot); }

/* ---------------- In-development treatment ---------------- */
.ks-tier.is-dev {
  opacity: 0.55;
  filter: grayscale(0.75);
}
.ks-tier.is-dev::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 12px,
    rgba(255, 255, 255, 0.022) 12px,
    rgba(255, 255, 255, 0.022) 24px
  );
  pointer-events: none;
}
.ks-tier.is-dev .btn {
  cursor: not-allowed;
  opacity: 0.7;
}

/* ---------------- Pass chip ---------------- */
.ks-pass {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: rgba(73, 182, 117, 0.08);
}
.ks-pass.is-visible { display: flex; }
.ks-pass-glyph {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent);
  color: #06210f;
  font-weight: 900;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ks-pass-body { font-size: 0.75rem; line-height: 1.4; }
.ks-pass-body strong { display: block; font-size: 0.82rem; }
.ks-pass-body span { color: var(--ks-dim); }

/* Soulbound marker */
.ks-bound {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ks-dim);
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: auto;
  white-space: nowrap;
}

/* ---------------- Footnote ---------------- */
.ks-foot {
  font-size: 0.68rem;
  color: var(--ks-dim);
  line-height: 1.5;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--ks-line);
}
.ks-foot a { color: #b9bec4; }

@media (max-width: 480px) {
  .ks-panel { padding: 14px; }
  .ks-badge { margin-left: 0; }
}

/* ---------------------------------------------------------------------
   Time Trials
   --------------------------------------------------------------------- */

.tt-clock {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 4px;
}

.tt-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tt-target {
  font-size: 0.7rem;
  color: var(--ks-dim);
  letter-spacing: 0.04em;
}

/* ---------------- Unlock reveal ---------------- */
.tt-unlock {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: rgba(73, 182, 117, 0.08);
}
.tt-unlock.is-visible { display: block; }

.tt-unlock-head {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.tt-unlock-body {
  font-size: 0.82rem;
  margin: 8px 0 14px;
  color: #d7dbe0;
}

/* Block, not inline-block: as an inline element its padding overflowed the
   line box and collided with the download button underneath. */
.tt-password {
  display: block;
  margin-top: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  background: #1c1e21;
  border: 1px solid var(--ks-line);
  border-radius: 6px;
  padding: 6px 10px;
  user-select: all;
  word-break: break-all;
}

.tt-unlock .btn {
  display: inline-block;
  margin-top: 2px;
}

@media (max-width: 480px) {
  .tt-display { font-size: 1.6rem; }
}

/* ---------------- Signal self-calibration ---------------- */
.tt-signal {
  font-size: 0.68rem;
  color: var(--ks-dim);
  margin: 6px 0 0;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tt-signal:empty { display: none; }

.tt-ignore-btn {
  margin-top: 8px;
  background: none;
  border: 1px solid var(--ks-line);
  border-radius: 8px;
  color: var(--ks-dim);
  font-size: 0.7rem;
  font-family: inherit;
  padding: 5px 10px;
  cursor: pointer;
}
.tt-ignore-btn:hover {
  color: var(--text);
  border-color: var(--ks-dim);
}
.tt-ignore-btn[hidden] { display: none; }

.ks-status code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  background: #1c1e21;
  border-radius: 4px;
  padding: 1px 5px;
}

/* ---------------- Pass gate ---------------- */
.tt-gate {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border: 2px dashed var(--ks-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.tt-gate.is-visible { display: block; }

.tt-gate-msg {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #c3c7cc;
  margin: 0 0 12px;
}

/* ---------------- Split halves inside a tier ---------------- */
.ks-half { margin-top: 12px; }
.ks-half + .ks-half {
  padding-top: 12px;
  border-top: 1px solid var(--ks-line);
}

.ks-half-label {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ks-dim);
}
.ks-half p { margin-top: 4px; }

/* ---------------------------------------------------------------------
   Attribution / hosting notice
   Legible and findable, but quiet — it is a statement of fact, not a
   defensive banner.
   --------------------------------------------------------------------- */
.site-notice {
  width: 100%;
  max-width: 620px;
  padding: 14px 16px;
  order: -1;
  border: 1px solid var(--ks-line);
  border-left: 3px solid var(--ks-dim);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.site-notice h2 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ks-dim);
}

.site-notice p {
  font-size: 0.74rem;
  line-height: 1.6;
  color: #b9bec4;
  margin: 0 0 10px;
}
.site-notice p:last-child { margin-bottom: 0; }

.site-notice strong { color: #d7dbe0; }

.site-notice a { color: #b9bec4; }

.site-credit {
  width: 100%;
  max-width: 620px;
  font-size: 0.68rem;
  color: var(--ks-dim);
  line-height: 1.5;
  text-align: center;
  margin: 0;
}
.site-credit a { color: #b9bec4; }
