/* ssd site — cards, grids, timeline, downloads, docs */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  padding: 26px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(1, 6, 20, 0.18);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
    background 0.22s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140, 190, 255, 0.42), transparent);
  opacity: 0.7;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03));
}
.card h3 { margin-bottom: 8px; font-size: 1.06rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.card .card-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 16px;
  color: var(--cyan);
  background: rgba(94, 151, 240, 0.13);
  border: 1px solid rgba(94, 151, 240, 0.22);
  border-radius: 12px;
}
.card .card-icon svg { width: 22px; height: 22px; }
.card.gold .card-icon { color: var(--gold); background: rgba(255, 209, 102, 0.1); border-color: rgba(255, 209, 102, 0.22); }
.card.green .card-icon { color: var(--green); background: rgba(52, 199, 123, 0.1); border-color: rgba(52, 199, 123, 0.22); }
.card.pink .card-icon { color: var(--pink); background: rgba(255, 143, 163, 0.1); border-color: rgba(255, 143, 163, 0.22); }
.card.violet .card-icon { color: #b9a6ff; background: rgba(139, 107, 224, 0.12); border-color: rgba(139, 107, 224, 0.24); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat {
  padding: 26px 22px;
  background: var(--bg-soft);
  text-align: center;
}
.stat b {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { color: var(--muted); font-size: 0.82rem; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step {
  position: relative;
  padding: 24px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.step::after {
  content: "";
  position: absolute;
  top: 40px; right: -17px;
  width: 18px; height: 1px;
  background: var(--line-strong);
}
.step:last-child::after { display: none; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: #fff; background: rgba(255, 255, 255, 0.045); font-weight: 650; white-space: nowrap; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--text); }
.ok { color: var(--green); font-weight: 650; }
.warn { color: var(--gold); font-weight: 650; }
.no { color: var(--pink); font-weight: 650; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  color: #cfe3ff;
  background: rgba(94, 151, 240, 0.13);
  border: 1px solid rgba(94, 151, 240, 0.24);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-gold { color: #ffe6a8; background: rgba(255, 209, 102, 0.11); border-color: rgba(255, 209, 102, 0.26); }
.badge-green { color: #a8f0c9; background: rgba(52, 199, 123, 0.11); border-color: rgba(52, 199, 123, 0.24); }
.badge-pink { color: #ffc3ce; background: rgba(255, 143, 163, 0.11); border-color: rgba(255, 143, 163, 0.24); }

/* ---------- timeline / changelog ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 11px;
  width: 2px;
  background: linear-gradient(180deg, rgba(94, 151, 240, 0.55), rgba(94, 151, 240, 0.06));
}
.release { position: relative; padding: 0 0 24px 44px; }
.release-marker {
  position: absolute;
  top: 8px; left: 3px;
  width: 18px; height: 18px;
  background: var(--bg-deep);
  border: 2px solid var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(94, 151, 240, 0.08);
}
.release.is-latest .release-marker {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(255, 209, 102, 0.12);
}
.release-card {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.release-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.release-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.release-head h3 { margin: 0; font-family: var(--mono); font-size: 1.08rem; letter-spacing: -0.01em; }
.release-head time { color: var(--faint); font-size: 0.78rem; font-family: var(--mono); }
.release-title { margin: 0 0 12px; color: #fff; font-size: 0.98rem; font-weight: 620; }
.release ul { margin: 0; padding-left: 1.1em; }
.release li { color: var(--muted); font-size: 0.88rem; }
.release li::marker { color: var(--blue); }

/* ---------- diagrams ---------- */
.diagram-card {
  padding: 18px;
  background: #f7f9fd;
  border: 1px solid rgba(185, 210, 250, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.diagram-card img { display: block; width: 100%; margin: 0 auto; border-radius: 10px; }
.diagram-card figcaption {
  margin-top: 12px;
  color: #4d5f80;
  font-size: 0.82rem;
  text-align: center;
}
.diagram-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.diagram-grid .wide { grid-column: 1 / -1; }

/* ---------- mascot gallery ---------- */
.mascot-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.expression {
  margin: 0;
  padding: 14px 8px 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
    background 0.22s var(--ease);
}
.expression:hover {
  transform: translateY(-4px) rotate(-1.5deg);
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(255, 255, 255, 0.07);
}
.expression img { width: 76px; height: 76px; }
.expression figcaption { margin-top: 6px; color: var(--muted); font-size: 0.78rem; }
.expression code { display: block; margin-top: 3px; padding: 0; background: none; border: 0; color: var(--faint); font-size: 0.62rem; }

/* ---------- downloads ---------- */
.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dl-card.is-featured { border-color: rgba(255, 209, 102, 0.36); }
.dl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dl-platform { color: var(--gold); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.dl-card h3 { margin-bottom: 6px; font-size: 1.14rem; }
.dl-card p { color: var(--muted); font-size: 0.9rem; }
.dl-meta { color: var(--faint) !important; font-family: var(--mono); font-size: 0.76rem !important; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 16px; }
.dl-actions .btn { flex: 1 1 auto; }
.sha {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 9px 10px;
  overflow-wrap: anywhere;
  color: var(--faint) !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid var(--line) !important;
  font-size: 0.68rem !important;
  line-height: 1.5;
}
.copy-btn {
  min-height: 38px;
  padding: 7px 13px;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 620;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.copy-btn:hover { color: #fff; border-color: var(--cyan); background: var(--surface); }
.copy-btn.is-copied { color: #07101f; background: var(--green); border-color: var(--green); }

/* ---------- notices / callouts ---------- */
.notice {
  padding: 16px 18px;
  color: var(--muted);
  background: rgba(94, 151, 240, 0.08);
  border: 1px solid rgba(94, 151, 240, 0.2);
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  font-size: 0.9rem;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: #fff; }
.notice-warn { background: rgba(255, 209, 102, 0.07); border-color: rgba(255, 209, 102, 0.22); border-left-color: var(--gold); }
.notice-pink { background: rgba(255, 143, 163, 0.07); border-color: rgba(255, 143, 163, 0.22); border-left-color: var(--pink); }
.notice-green { background: rgba(52, 199, 123, 0.07); border-color: rgba(52, 199, 123, 0.22); border-left-color: var(--green); }

/* ---------- tip / QR ---------- */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.qr-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
  color: #101a30;
  background: #fff;
  border: 1px solid rgba(185, 210, 250, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(1, 6, 20, 0.35);
  cursor: zoom-in;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.qr-card:hover { transform: translateY(-4px); box-shadow: 0 28px 60px rgba(1, 6, 20, 0.45); }
.qr-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.qr-card img { width: min(100%, 260px); height: auto; border-radius: 10px; display: block; }
.qr-card-label { font-size: 1.02rem; font-weight: 700; color: #101a30; }
.qr-card-hint { color: #526688; font-size: 0.8rem; }
.qr-card .badge { color: #0d3f8f; background: rgba(46, 107, 230, 0.1); border-color: rgba(46, 107, 230, 0.25); }
.qr-note { max-width: 720px; margin: 26px auto 0; text-align: center; }

.qr-modal {
  width: min(92vw, 560px);
  max-width: none;
  max-height: none;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}
.qr-modal::backdrop {
  background: rgba(3, 8, 20, 0.84);
  backdrop-filter: blur(8px);
}
.qr-modal-inner {
  position: relative;
  padding: 22px 22px 18px;
  color: #101a30;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  text-align: center;
}
.qr-modal-inner h2 { margin: 0 0 14px; color: #101a30; font-size: 1.1rem; }
.qr-modal-inner img {
  display: block;
  width: min(80vw, 440px);
  max-height: 68vh;
  margin: 0 auto;
  object-fit: contain;
}
.qr-modal-inner p { margin: 12px 0 0; color: #526688; font-size: 0.82rem; }
.qr-modal-close {
  position: absolute;
  top: 8px; right: 10px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  color: #33425f;
  background: #eef4ff;
  border: 1px solid #d5e2f7;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.qr-modal-close:hover { color: #0b1a33; background: #dfeaff; }
.qr-modal[open] .qr-modal-inner { animation: qrPop 0.22s var(--ease); }
@keyframes qrPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
body.qr-open { overflow: hidden; }

/* ---------- misc ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 34px; align-items: center; }
.split > * { min-width: 0; }
.kicker-list { margin: 0; padding: 0; list-style: none; }
.kicker-list li {
  position: relative;
  padding-left: 26px;
  margin: 0.55em 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.kicker-list li::before {
  content: "";
  position: absolute;
  top: 0.6em; left: 4px;
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 2px;
  transform: rotate(45deg);
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 28px; }
.mt-4 { margin-top: 40px; }
.center { text-align: center; }
.section-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.toc a {
  padding: 6px 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
}
.toc a:hover { color: #fff; border-color: var(--line-strong); }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::after { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .diagram-grid { grid-template-columns: 1fr; }
  .mascot-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .qr-grid { grid-template-columns: 1fr; max-width: 380px; }
  .mascot-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .expression img { width: 64px; height: 64px; }
  .release { padding-left: 34px; }
  .release-card { padding: 18px; }
  .timeline::before { left: 9px; }
  .release-marker { left: 1px; }
}

@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr; }
  .mascot-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-actions .btn, .dl-actions .copy-btn { flex: 1 1 100%; }
}
