:root {
  --ckg-asset: #e7f0ff;
  --ckg-threat: #ffeded;
  --ckg-weakness: #fff4d8;
  --ckg-safeguard: #e7f8ee;
  --ckg-assurance: #f0ebff;
  --ckg-leadership: #edf2f5;
  --ckg-ink: #111827;
  --ckg-muted: #5b6472;
  --ckg-border: rgba(17, 24, 39, .12);
}

.md-typeset {
  font-size: .86rem;
}

.md-typeset h1 {
  color: var(--ckg-ink);
  font-weight: 750;
  letter-spacing: -.035em;
}

.md-header {
  box-shadow: none;
}

.landing-hero {
  margin: 1rem 0 2rem;
  padding: 2.4rem;
  border-radius: 28px;
  background: radial-gradient(circle at top left, rgba(74, 128, 255, .24), transparent 32%), linear-gradient(135deg, #0b0f17, #1f2937);
  color: #fff;
}

.landing-hero h1 {
  margin: .35rem 0 .85rem;
  max-width: 980px;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: .95;
  letter-spacing: -.06em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  opacity: .72;
  font-weight: 800;
}

.hero-subtitle {
  max-width: 760px;
  font-size: 1.05rem;
  opacity: .86;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

.primary-action,
.secondary-action {
  display: inline-block;
  padding: .72rem 1.05rem;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 800;
}

.primary-action {
  background: #fff;
  color: #111 !important;
}

.secondary-action {
  border: 1px solid rgba(255,255,255,.35);
  color: #fff !important;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.hero-card {
  display: block;
  padding: 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--ckg-border);
  font-weight: 750;
  text-decoration: none !important;
  color: var(--ckg-ink) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

.hero-card span {
  display: block;
  margin-top: .35rem;
  font-size: .8rem;
  font-weight: 500;
  opacity: .75;
}

.asset { background: var(--ckg-asset); }
.threat { background: var(--ckg-threat); }
.weakness { background: var(--ckg-weakness); }
.safeguard { background: var(--ckg-safeguard); }
.assurance { background: var(--ckg-assurance); }
.leadership { background: var(--ckg-leadership); }

.periodic-shell {
  margin: 2.25rem 0;
  padding: 1.35rem;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--ckg-border);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .08);
  overflow-x: auto;
}

.compact-home {
  margin-top: -1rem;
}

.periodic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.2rem;
  font-size: .72rem;
}

.legend-pill {
  padding: .26rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--ckg-border);
  color: var(--ckg-ink);
  font-weight: 700;
  white-space: nowrap;
}

.periodic-table {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: .8rem;
  min-width: 860px;
}

.element {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 132px;
  padding: .82rem;
  border-radius: 16px;
  border: 1px solid var(--ckg-border);
  box-shadow: 0 5px 18px rgba(15, 23, 42, .055);
  text-decoration: none !important;
  color: var(--ckg-ink) !important;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.element:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
  border-color: rgba(37, 99, 235, .32);
}

.element-number {
  font-size: .66rem;
  color: var(--ckg-muted);
  font-weight: 700;
}

.element-symbol {
  align-self: end;
  font-size: 2rem;
  line-height: .95;
  font-weight: 900;
  letter-spacing: -.04em;
  color: #0b1220;
}

.element-name {
  margin-top: .32rem;
  font-size: .78rem;
  line-height: 1.1;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.element-kind {
  margin-top: .28rem;
  font-size: .64rem;
  color: var(--ckg-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.element-spacer {
  visibility: hidden;
}

.periodic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: .75rem;
  margin: 1.5rem 0;
}

.periodic-cell {
  min-height: 105px;
  padding: .8rem;
  border-radius: 12px;
  border: 1px solid var(--ckg-border);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.periodic-symbol {
  font-size: 1.6rem;
  font-weight: 800;
}

.periodic-name {
  font-weight: 700;
  margin-top: .2rem;
}

.periodic-desc {
  font-size: .78rem;
  margin-top: .35rem;
  opacity: .78;
}

@media (min-width: 1220px) {
  .periodic-table {
    grid-template-columns: repeat(8, minmax(126px, 1fr));
    min-width: 1080px;
  }
}

@media (max-width: 900px) {
  .periodic-table {
    grid-template-columns: repeat(4, minmax(126px, 1fr));
    min-width: 560px;
  }
}

@media (max-width: 520px) {
  .periodic-table {
    grid-template-columns: repeat(2, minmax(126px, 1fr));
    min-width: 270px;
  }

  .landing-hero {
    padding: 1.4rem;
  }
}
